ImageEn, unit imageenio

TImageEnIO.SaveToStreamGif

TImageEnIO.SaveToStreamGif


Declaration

procedure SaveToStreamGif(Stream: TStream);


Description

Saves the current image to a stream in GIF format.

Note:
 If StreamHeaders property is true, then a special header is added as required for multi-image streams.
 To abort while saving set Aborting to true


Example

// Saves images in ImageEnView1 and ImageEnView2 to the file Images.dat
// Note: images.dat isn't loadable with LoadFromFileXXX methods
var
  fs: TFileStream;
Begin
  fs := TFileStream.Create('C:\images.dat', fmCreate);
  ImageEnView1.IO.StreamHeaders := True;
  ImageEnView1.IO.SaveToStreamGIF(fs);
  ImageEnView2.IO.StreamHeaders := True;
  ImageEnView2.IO.SaveToStreamGIF(fs);
  fs.free;
End;

// Saves a single image to image.gif
// image.gif is loadable with LoadFromFileXXX methods
var
  fs: TFileStream;
Begin
  fs := TFileStream.Create('image.gif');
  ImageEnView1.IO.StreamHeaders := False;
  ImageEnView1.IO.SaveToFileGIF(fs);
End;


See Also

 SaveToFileGIF
 LoadFromStreamGIF
 GIF_ImageIndex
 GIF_ImageCount
 IEOptimizeGIF
 Global Image Methods