Declaration
procedure IEOptimizeGIF(const InputFile, OutputFile: WideString);
Description
Optimizes a GIF animation (or multi-page GIF) by detecting differences between each frame and removing any data that is duplicated. The resulting file will only include differences between frames and can be significantly smaller.
Note:
◼You can specify the same filename for both
InputFile and
OutputFile◼You can also optimize GIF files with ImageMagick using
TIEMiscPluginsImageMagick_OptimizeGIF | Demos\ImageEditing\AnimatedGIF\AnimatedGIF.dpr |
ImageEnMView1.MIO.SaveToFile('D:\temp.gif');
IEOptimizeGIF('D:\temp.gif', 'D:\output.gif');
// Create an animated GIF file from ten source images
mbmp := TIEMultiBitmap.Create();
for i := 0 to 9 do
begin
mbmp.AppendImage( format( 'D:\Source\Frame %d.bmp', [i] ));
mbmp.Params[i].GIF_DelayTime := 10; // Display each frame for 1/10th of a second
end;
mbmp.SaveToFile( 'D:\animated.gif' );
mbmp.Free;
IEOptimizeGIF( 'D:\animated.gif', 'D:\animated.gif' );
See Also
◼TIEMiscPluginsImageMagick_OptimizeGIF◼CheckAniGIF◼DeleteGifIm◼EnumGifIm (Image Count)
◼Global Image Methods◼SaveToFileGIF◼SaveToStreamGIF◼ReplaceFileGIF◼InsertToFileGIF