• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

GIF metadata saving bug

Started by iw, 14 June 2012, 10:13:04

Previous topic - Next topic

iw

Hello. Great work! Thanks.
Found a little bug that skips saving of GIF's metadata. For example when using "vampconvert.exe" with resize param for gif image with frames, it will save output file with default metadata delay and this is not right.

Version 0.77.1/DXE2

My workaround at line 1138 of ImagingGif.pas:
Code (delphi) Select

  procedure SaveGlobalMetadata;
  var
    AppExt: TGIFApplicationRec;
    BlockSize, LoopExtId: Byte;
    Repeats: Word;
  begin
    FMetadata.CopyMetaItems; //maybe this line should be added to ImagingGif.pas?

    if FMetadata.HasMetaItemForSave(SMetaAnimationLoops) then
    with GetIO do
   ....

iw

And it seems there is another one bug with resizing animated gif images with background transparency. After resizing, image backgroud became black.

Galfar

Metadata for saving is currently meant to be set by the application using the library, not the library itself -
since metadata are stored globally and are overwritten by each loaded image
(better solution of course would be to store the metadata directly in each image -
this could be achieved with current version but it's quite complicated).

VampConvert was missing Metadata.CopyMetaItems, that was fixed.

Animated GIFs are converted to A8R8G8B8 format when being animated so they usually cannot be saved
back to GIF (with max 256 colors) correctly. Saving to format that supports A8R8G8B8 is recommended or
another option is to disable GIF auto-animation and thus keep the image in 256 color format.

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk