Page 1 of 3

Setting transparent colour for viewing animated GIFs

Posted: Sat Jan 27, 2007 12:07 pm
by helmut
A question to the animated GIF experts: A XnView user has contacted me asking how the background colour of animated GIFs can be set (for viewing the animated GIFs).

I've searched the forum a bit but to my surprise I couldn't find a solution. Is there any?

Re: Setting transparent colour for viewing animated GIFs

Posted: Sat Jan 27, 2007 2:50 pm
by XnTriq
Here goes my two cents worth (while we're waiting for an expert to chime in ;-):

I doubt it can be done in XnView. Maybe there's a way in NConvert?

Whenever I need to do this I use GIF Movie Gear.

Posted: Sat Jan 27, 2007 7:52 pm
by helmut
Thank you for your reply, XnTriq.

In the meantime I have found out that transparency of ICO files was meant. But I think that isn't possible in XnView, either - is it?

Posted: Sat Jan 27, 2007 8:38 pm
by Drahken
I'm a bit confused about the question.
1) In the first post it's not clear if you're talking about making the background transparent or about setting the background to a specific color.
2) In the last post, are you talking about still icons or animated icons? (I've never heard of animated icons.)

While xnview can view animated images, it can't edit animated images. This means that it can't change them in any way. Can't resize them, can't change colors, nothing.
For still icons, you can set a transparent color by reducing the image to 256 colors or less, then go image->edit colormap (or ctrl+m), select the color you want and check the transparent box, now just save as ico. It won't look transparent when you reopen it in xnview (xnview doesn't seem to be able to view transparency in icons), but it will be transparent.

A global issue…

Posted: Sat Jan 27, 2007 10:42 pm
by Clo
—> Drahken

• There was a thread in the French forum about animated GIFs, but alas I couln't find out it again,
maybe lost during the big forum crash…
- Indeed, one can only extract the frames using XnView, then change the transparency colour or anything possible, and rebuild the animation via a third-party programme only… I use also Gif Movie Gear for ever.

• About icons :
…For still icons, you can set a transparent color by reducing the image to 256 colors or less…
- If not done yet, you might have a glance in THIS THREAD and also in THIS ONE
• Currently, Pierre is trying to improve the icons display, but till today, not very successfully…:|
- For instance, that I get to display a 32*32 - 32 BPP icon :


• As a great image-viewer, XnView must display icons of any kind, I guess, and also prior its own ones, like you can see i.e. THERE, a problem pending for one year and half, and not really solved yet…

- “Animated” icons exist…

:mrgreen: KR

Posted: Sun Jan 28, 2007 1:50 am
by XnTriq
Version 1.90 introduces a better way of displaying transparent/translucent areas of images in View mode: Transparency is now blended with the background color of the View window which can be specified by the user via...
  • Tools » Options... » View » Background colour
As Clo has already pointed out, this feature doesn't work with all Windows icons:
  • Image
The one I used for this demo screenshot is part of burnsflipper's set which is available for download at deviantART.

Posted: Sun Jan 28, 2007 4:45 am
by Drahken
I'm using 1.9b6, and it does NOT show transparency for ico files (gif, but not ico). When you make a color transparent, save the image as an ico, then reopen it in xnview, the color is no longer transparent. Not only does it not appear transparent, but if you view the colormap, the color is no longer checked as being transparent. However, if you open the same image in another prog, it's still transparent (proving that the ico did get saved properly).

Posted: Thu Feb 01, 2007 11:00 pm
by XnTriq
Back to the original question at hand:
helmut wrote:In the meantime I have found out that transparency of ICO files was meant. But I think that isn't possible in XnView, either - is it?
If the user who contacted you can't get it to work in XnView, I would recommend IcoFX (freeware), which is my new favorite icon editor.

Posted: Thu Feb 01, 2007 11:57 pm
by helmut
Thank you all for your answers. I really mean the normal icons (and not animated GIF).

At the moment I'm somewhat confused because people write that one could see transparency for ICO files, but all I can see is a black background for all my icon files. Is there something special about the ICO file?

I've zipped some sample icons for trying.



Posted: Fri Feb 02, 2007 12:13 am
by Stitscher
With XnView I see a black background. With IrfanView and other viewers all is fine with the transparency.

Posted: Fri Feb 02, 2007 12:43 am
by Drahken
Same here. It appears that xnview doesn't handle transparency in ico files very well.

Same song…

Posted: Fri Feb 02, 2007 2:04 am
by Clo
:arrow: All…

:) Hello!

• Well, this is not new, you are singing the song I sing for years, and now this must be solved…:D

{Mr. Librarian, please, a nice panel of the related threads, including the French ones ? TIA ! }

• Did you watch the topics I linked above ? There is some info about that is improved yet and that is not…

• The very usual 8 BPP icons having a 1-bit defined transparent BG -that you can view in other programmes- are not supported (yet ?) because the current internal library can't.
- Pierre said me : “For me, this is not a normal¦valid image format…” or so.

• Currently, with the 1.90 final :

1. 24 BPP icons display the transparency, because they are loaded AS 32 BPP… You get various results with regard to the size of such icons - matching the “Win Standards” or being in custom sizes…
- BTW, all these icons are marked 32 BPP ! :bug:
- For instance, 24² - 24 BPP icons are OK in Preview and in View (as long as you don't zoom in¦out them, the BG turns black and doesn't come back to transparency, issue pending still).
- On a board of thumb nails, the BG is always black thus, issue pending too.

2. With 24 BPP icons drawn in custom sizes, that works or not, i.e. there is a problem of broken motives with 22*26 for a skin of mine (as extra-icons you may add now)…
- Same with 21²… I sent samples to Pierre, I guess he's working on…

• A simple way to see the behaviour of XnView with icons :

- In M$Paint, draw some BMPs in various sizes, anything simple as motif does the trick.
You'll have True Colours 24 BPP bitmaps…
- Convert those BMPs into “Win Icon” in XnView, and watch the result…
- Convert one 24 BPP icon into 32 BPP, and - surprise !- now it's all transparent, like I showed above.
¤ This is due to a (unknown before ?) bug in the 32 BPP conversion, I hope that Pierre'll fix up it soon…

3. There are also some hitches with the display of extra-icons in the tool-bar for some custom sizes, like I quote above too.
- There is a way to avoid that Windows resizes the custom-sized icon twice (then, it's quite defaced)…
I indicated that in the French forum a long while ago, however I don't know if this can be used
with the programming language here (that does with Delphi™ in Total Commander, after a looooong row with the Author ! Image)

:mrgreen: KR

Posted: Fri Feb 02, 2007 7:59 am
by xnview
Drahken wrote:Same here. It appears that xnview doesn't handle transparency in ico files very well.
XnView handle transparency for ico when you have 32bits ico (alpha), or 24bits (mask)

Posted: Fri Feb 02, 2007 8:27 am
by Drahken
The problem there is that most icons (especially ones made with free software) are 8bit, meaning that the majority of icon files won't show with transparency in xnview. While xnview itself can make icon files in 24bit format, it can only make transparent files (of any kind) in 8bit format.

Interesting thing to do: Use xnview to open xnview.exe, it'll open the icons embedded in the program. The odd this is that in the littler preview window where it lets you select the icon you want the icons will be shown with proper transparency, but once you choose an icon and it opens in the viewer, transparency is gone. This raises the question: If the previewer can view the 8bit transparency, why can't view mode?

Image Image

Just a trick

Posted: Fri Feb 02, 2007 9:46 am
by Clo
—> Drahken

:) Hello !
…This raises the question: If the previewer can view the 8bit transparency, why can't view mode?
• In fact, it doesn't ! This is just a trick, I guess that the BG info (always black) is inverted in this window, no more…
- The same when viewing the content of an ICL made with such 8 BPP icons, the BG is white,
but if you save¦copy and paste¦display a “page”, the BG is black still…
- This is used i.e. by Imagine (Total Commander Lister plug-in and also standalone) to display these icons with a white BG…
• I often use a workaround to recover some icons I need from an EXE or so :
- I make a capture Alt+PrintScreen of the Multiple icons box, while displaying the wished icon in its preview pane.
- Import clipboard, then crop to the right size, save as… and I get an icon with a white BG. Indeed, the real original “White” on the edges (if existing) is lost, but in the average I recover usable icons…
- Often, I save as BMP and make retouchs in Paint, then convert into ICO keeping the white BG,
or changing it into a very light pastel colour…

• Whether the internal library is not improved to support these usual 8 BPP icons, IMHO the only good way should be to use a plug-in able to display them with the transparency…
- We have one for T.C. (IclView) to display *.ICO and *.ICL very properly, and it's free…
- I've sent it (and another free icon-soft) to Pierre a while ago, but… fallen in a deep well :|

• Icons are very important in any OS, they are the command-levels of all softs, and the first thing you see of them…

- This issue is a thorn in a toe, a beautiful girl with a glass eye, a nice joint of roast beef without garlic,
and whatever you want in the same painting… Image

:mrgreen: KR