Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transparent background for animated gif not staying

Status
Not open for further replies.

CraigB2

Programmer
Jun 15, 2003
9
0
0
US
Hi, I just found this forum so this is my first post here. However, I am not new to forums in general, so I did what I should and performed a search first but didn't find my answer.

I have a small nine frame animation that I wanted to reduce in size, however I seem to be unable to get the background to remain transparent after saving. I eventually tried resaving the original with no changes (it needs to be noted that I DID select a Transparency Image Color under the Frame Settings tab when saving ) and this did not work either.

I am currently running version 8.369 (I actually have version 9 around here somewhere, but haven't upgraded - now I wonder if I should move up to 10 instead...).

Anyway, any help would be appreciated! [smile]

Craig B.
 
have you opened up the GIF and sampled the background? Are the color values exactly the same in each frame?
 
Thanks for replying! Yes, the color backgrounds are exactly the same for all nine frames. In the one test I did not change anything, I just opened it up as an "GIF Animation" and then did a "Save As".

The color used for transparency is number 64 in the color palette. Does that make a difference? I tried changing the "Background" in "Color Options" ("File Settings" tab during the "Save As") to be "64", but it made no difference.

I've also tried using the "Local Palette" and combinations of the above, so far to no avail.

Any ideas?

Craig B.
 
how about posting a link to the file in question so people can see where the problem may lie?
 
Well, I FINALLY got it to work, but there MUST be a better way! During a prior test, I swapped the colors #0 and #64 (the original background color), replaced the background color with color number 0 in the palette and then replaced the pixels that were using color number 0 with the new color number 64. I'm not sure if I could have resolved it using color number 64 as background yet (I'll try that test in a bit).

Here's what I had to do:

When saving the gif, for EACH frame, I had to go the the "Frame Settings" tab and change "Transparency" to the correct "Image color"; AND I had to change the frame delay (which had defaulted to 200ms instead of the 0 is used to be). I clicked "Apply All" on each frame. I don't know if changing the "Background" (part of "Color options" on the "File Settings" tab) would normally be required, since it defaults to 0 and I had changed the background to color number 0 already.

I think it's interesting (ok, I'll admit that I actually think it's pretty darned annoying) that after I reopened the file to resave, all of the image transparency settings were back to "None".

Anyway, thanks to javabearSTL for taking the time to respond! I do appreciate it! And, should you know of a better way to get this to work I'd love to know it!

Craig B.
 
well, that's pretty typical for animated GIFs... you can select all the frames at once and define what the transparency color is when you save it so you don't have to manually change each frame. More and more, people are using Flash (and hopefully in the future MNG and SVG) for animation.
 
Just to be thorough, I tried resaving the original which had a background using color number 64 in the palette. For each frame I changed the "Transparency" to the "Image color" 64 (in the "Frame Settings" tab) and clicked "Apply All". Interestingly enough, on all the remaining frames, the "Transparency" setting was still "None", but the "Image color" listed was now 64 (backshaded since the "Image color" radio button was not selected. So close... if only it would have changed the button all the way down!

I should also note that this time the delays between each frame stayed as they were on the original (not sure why it didn't the first time!).

Anyway, this way also worked so I wanted to post this followup so others with the same issue won't need change the background colors!

Craig B.
 
Heh, your reply came in while I was replying!

I never thought to try selecting more than one frame at a time - that was the shortcut I was looking for!

Thanks again!

Craig B.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top