Tkinter Bitmap Newbie question

klappnase klappnase at web.de
Tue Mar 15 05:16:20 EST 2005


Neil Hodgson <nyamatongwe+gravity at gmail.com> wrote in message news:<MPG.1ca0cf53b7a79733989682 at news-server>...
> Wim Goffin:
> 
> > But just to make sure I'm on the right track,
> > - Is XBM the best way to for bitmaps? The ones I saw so far are all black 
> > and white. Do they also exist in color?
> 
>    XPM is the version of XBM with colour.
> 
> > - Is XBM also the best format for glyphs on the Windows platform? Or would 
> > 'Images' of a different format be nicer?
> 
>    It depends on what you want to do with icons. Do you want users to be 
> able to change icons? It is less likely Windows users will have tools 
> for manipulating XPM files. The only feature that you are likely to want 
> that is not available from XPM is multi-level transparency which is 
> available from PNG files. 
> 
>    My generic advice without additional details of your project is that 
> PNG is the best format for icons displayed by your code. Icons used by 
> the operating system such as for applications should be in a format 
> supported by that OS: Windows prefers ICO files.
> 
> > - Does someone know of a nice downloadable collection of standard glyphs 
> > (Bitmaps for Open file, New file, Save file, ...) with a free license?
> 
> http://sourceforge.net/projects/icon-collection/
> 
>    Neil

However, if you want to use Tkinter you should be aware that Tkinter
only supports xbm-Bitmaps and gif-Images out of the box. You can use
the python imaging library to add support for other image formats but
I think that PIL just does an on the fly format conversion into gif
for you, so you might experience a quality loss if you use for example
png icons, so you are probably better off looking for a collection of
gifs.

Best regards

Michael



More information about the Python-list mailing list