Difference between revisions of "GIF"

From Free Pascal wiki
Jump to navigationJump to search
(new page)
 
m (Fixed syntax highlighting; categorised)
 
Line 4: Line 4:
 
It gives unit which self-registers in Free Pascal classes, and also in Lazarus' TPicture:
 
It gives unit which self-registers in Free Pascal classes, and also in Lazarus' TPicture:
  
<syntaxhighlight>
+
<syntaxhighlight lang=pascal>
 
initialization
 
initialization
  
Line 13: Line 13:
 
   TPicture.RegisterFileFormat(TAnimatedGif.GetFileExtensions,'Animated GIF', TAnimatedGif);
 
   TPicture.RegisterFileFormat(TAnimatedGif.GetFileExtensions,'Animated GIF', TAnimatedGif);
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
[[Category:Graphics]]

Latest revision as of 12:40, 16 February 2020

GIF is a graphic format. From about 2004 year, code for LZW compressing (for GIF) is free. So it's free.

To show GIF image, animated or not, you can use AnimatedGif library. It gives unit which self-registers in Free Pascal classes, and also in Lazarus' TPicture:

initialization

  //Free Pascal Image
  ImageHandlers.RegisterImageReader ('Animated GIF', TAnimatedGif.GetFileExtensions, TFPReaderGIF);

  //Lazarus Picture
  TPicture.RegisterFileFormat(TAnimatedGif.GetFileExtensions,'Animated GIF', TAnimatedGif);