Lost gif transparency

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

Post Reply
igor

Lost gif transparency

Post by igor »

Lost transparenñó when resize or 'Convert colours' in GIF-image. It's bug?
User avatar
xnview
Author of XnView
Posts: 46252
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Lost gif transparenñó

Post by xnview »

igor wrote:Lost transparenñó when resize or 'Convert colours' in GIF-image. It's bug?
It's not normal after a resize
Pierre.
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post by Drahken »

Did you do a pixel resize, or use a filter? Using a resizing filter changes the color palette. When resizing a GIF, you almost always want to use pixel resize.
igor

Post by igor »

I try decrease size 256-color GIF-image with transparency. Truecolor-image without transparency as a result!?
User avatar
xnview
Author of XnView
Posts: 46252
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

igor wrote:I try decrease size 256-color GIF-image with transparency. Truecolor-image without transparency as a result!?
When you convert in RGB, an alpha channel is not created...
Pierre.
igor

Post by igor »

I want only resize! Colors convert auto to truecolor :(
igor

Post by igor »

Problem solved. Resize without lost transparency work with two top items in Resample option (Nearest Heighbour and Bilinear).

Last problem. Lost transparenñó after decrease colours ('Image -> Convert To Colours' menu item) in GIF. It's solvable?
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post by Drahken »

Nearest neighbor is the pixel resize I mentioned earlier (most progs call it pixel resize, I hadn't noticed the xnview uses a different name). I'm rather surprised that bilinear doesn't change the color palette. All other filters wll change your image to true color, and remove transparency. It's simply a byproduct of how they work, and is unavoidable. To prevent this problem, simply use the nearest neighbor filter.


Changing the color depth (especially decreasing the colors) changes the color palette and will often remove or alter the transparent color (you might find that some other part of the image is suddenly transparent). Increasing the color depth -shouldn't- remove transparency as long as it's still 256 colors or less. Losing transparency while decreasing color depth can't be avoided, but it can be fixed. Go Image->Edit Colormap (or hit ctrl+M) . Now the next step is easy, but you may have to repeat it several times to find the right color:
Click on a color that you think is the color of the portion of the image you want transparent (ie, lets say you're working on my woody avatar, and it has a green background, you would select the green box on the color map. If there's more than one green box, you'll have to repeat this step until you find the correct one), then check the "enable transparency" box, then click OK. If you picked the right color, the background should now be transparent. If not, simply hit ctrl+M again and select a different color, then click OK. Repeat as needed until you find the right color.

(It sounds more complicated than it really is, it's difficult to explain something adequately with just words. Just give it a try, and refer back to this post if you need to.)
igor

Post by igor »

Thanks all!
Post Reply