Saving GIF anims with transparency

Report any Hollywood bugs here

Saving GIF anims with transparency

Postby jPV » Mon Mar 27, 2017 6:31 pm

I can't seem to be able to save GIF anims with the wanted transparent color. Some "random" color gets the transparency always. Actually it seems that the "random" color is the last used color from the palette, or so... at least it seemed like that when I was looking the resulted animation with GIF-Toolkit. The resulting transparent color is always the same no matter what I try to define with the Transparency option.

And second issue, #ATTRTRANSPARENTCOLOR attribute gives always -1 even if I load existing animation with working transparency.

Code: Select all
LoadAnim(1,"Hollywood:Examples/Hollywood/Epiphany/gearsbig.gif")
DisplayAnimFrame(1,0,0,1)
SaveAnim(1,"ram:test.gif", #ANMFMT_GIF, {Transparency=$3432F4}) ; let's try to make the blue gear transparent
FreeAnim(1)
LoadAnim(1,"ram:test.gif", {LoadTransparency=True})
DebugPrint(GetAttribute(#ANIM,1,#ATTRTRANSPARENTCOLOR)) ; this seems to give -1 always
WaitLeftMouse
Cls
DisplayAnimFrame(1,0,0,1) ; some red color gets transparent, last of the used colors in the palette?
WaitLeftMouse
User avatar
jPV
 
Posts: 48
Joined: Sat Mar 26, 2016 11:44 am
Location: RNO

Re: Saving GIF anims with transparency

Postby airsoftsoftwair » Tue Mar 28, 2017 11:50 pm

Hmm, true, I'll fix this, thanks for reporting!
User avatar
airsoftsoftwair
 
Posts: 2028
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Saving GIF anims with transparency

Postby airsoftsoftwair » Thu Apr 27, 2017 9:32 pm

Code: Select all
- Fix: When saving a GIF ANIM whose frames didn't have to be quantized because they fit into
  desired number of colors, the transparency pen wasn't set correctly
User avatar
airsoftsoftwair
 
Posts: 2028
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Saving GIF anims with transparency

Postby airsoftsoftwair » Thu Apr 27, 2017 9:35 pm

And second issue, #ATTRTRANSPARENTCOLOR attribute gives always -1 even if I load existing animation with working transparency.


That's normal behaviour. #ATTRTRANSPARENTCOLOR is currently only supported for RGB colors specified when loading an object using the "Transparency" tag. The special "LoadTransparency" tag currently isn't compatible with #ATTRTRANSPARENTCOLOR because in a palette image an RGB color isn't a reliable transparency because it could be in there several times in different pens.
User avatar
airsoftsoftwair
 
Posts: 2028
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany


Return to Hollywood bugs

Who is online

Users browsing this forum: No registered users and 2 guests