Board index » delphi » create gif image under windows 2000

create gif image under windows 2000

hi i try to create a gif image under windows 2000, but i have alway

cannot create xxxxx.xxx file....

under windows 9x that work fine

it not a right problem under win2k because i can create jpg file

i use tgifimage availabe here: http://www.melander.dk/delphi/gifimage/

this is my code:

procedure TCSDM.creerFichier;
var
  FormImage: TBitmap;
  Gif: TGifImage;
begin
  FormImage := GetFormImage;
  Gif := TGifImage.Create;
  try

    if(lettre.couleur='rmQuantize')then
      gif.ColorReduction:=rmQuantize
    else if(lettre.couleur='rmQuantizeWindows')then
      gif.ColorReduction:=rmQuantizeWindows
    else if(lettre.couleur='rmWindows256') then
      gif.ColorReduction:=rmWindows256
    else if(lettre.couleur='rmWindowsGray')then
      gif.ColorReduction:=rmWindowsGray
    else if(lettre.couleur='rmGrayScale') then
      gif.ColorReduction:=rmGrayScale
    else if(lettre.couleur='rmMonochrome')then
      gif.ColorReduction:=rmMonochrome
    else
      gif.ColorReduction:=rmWindows20;

    if (lettre.qualite='gcRLE') then
      gif.Compression:=gcRLE
    else
      gif.Compression:=gcLZW;

    gif.Assign(FormImage);
    gif.savetofile(cboDestinataire.Text+' '+datetostr(dtpDate.Date)+'.gif');
  finally
    FormImage.Free;
    gif.Free;
  end;
end;

i thing the problem is the composent.....

what composent do u use for create gif image under windows 2000

 

Re:create gif image under windows 2000


Hi Marc,

Quote
> hi i try to create a gif image under windows 2000, but i have alway
> cannot create xxxxx.xxx file....
> under windows 9x that work fine
> it not a right problem under win2k because i can create jpg file
> i use tgifimage availabe here: http://www.melander.dk/delphi/gifimage/

I also use TGifImage from Anders Melander and I have no problem to create
GIF files under Windows 2000.

But the differences are:
- I don't use GetFormImage (the bitmap is drawn through Canvas methods);
- the ColorReduction mode is not explicitly set;
- only the RLE compression method is used.

Maybe that can help you trace the problem.

Thrse

Other Threads