tgifimage

Delphi TGIFImage animation issue with some GIF viewers

十年热恋 提交于 2020-01-02 01:45:52
问题 I have discovered that animated GIFs created using Delphi 2009's TGIFImage sometimes doesn't play correctly in some GIF viewers. The problem is that the animation is restarted prematurely. Consider the following example: program GIFAnomaly; {$APPTYPE CONSOLE} uses Windows, Types, Classes, SysUtils, Graphics, GIFImg; var g: TGIFImage; bm: TBitmap; procedure MakeFrame(n: integer); var x: Integer; y: Integer; begin for x := 0 to 256 - 1 do for y := 0 to 256 - 1 do bm.Canvas.Pixels[x, y] := RGB(

Delphi TGIFImage animation issue with some GIF viewers

风流意气都作罢 提交于 2019-12-05 01:39:57
I have discovered that animated GIFs created using Delphi 2009's TGIFImage sometimes doesn't play correctly in some GIF viewers. The problem is that the animation is restarted prematurely. Consider the following example: program GIFAnomaly; {$APPTYPE CONSOLE} uses Windows, Types, Classes, SysUtils, Graphics, GIFImg; var g: TGIFImage; bm: TBitmap; procedure MakeFrame(n: integer); var x: Integer; y: Integer; begin for x := 0 to 256 - 1 do for y := 0 to 256 - 1 do bm.Canvas.Pixels[x, y] := RGB((x + n) mod 255, (x + y - 2*n) mod 255, (x*y*n div 500) mod 255); end; var i: integer; begin bm :=