Re: UI design for Tk app--PNG's or GIF's for icons?



O/H Kevin Walzer έγραψε:
I hope this isn't too off-topic. I'm curious as to what others think
about the question of gif or png files for icons in a Tk application.

I know gif's are more commonly used by Tk developers, likely because
gif's are supported natively and some de-facto Tk stock icons (such as
those that ship with BWidgets) are gif's. Other formats require the Img
extension.

Some say that png's look smoother than gifs, which can be jaggy, and
this may subtly contribute to user perceptions about an application's
polish. So: does anyone use png's in their applications? Or is this,
perhaps, more a matter of the overall application design/look/feel than
a single factor like the image format of the icons? (Looking at Eclipse,
where a huge amount of care has gone into the UI design and where the
icons are gifs, leads me to think that this is the case.)


But seeing from the developer perspective, in my Ellogon application, I use a simple scheme: I have created a scheme for naming images (for example ITExit is an exit image that can be used in a toolbar, etc.)
Then, I created a directory in my app for storing themes, which can contain any number of themes (each one in its subdirectory).

When I want an image, I retrieve it with a function. The Ellogon's one
is GUI_LoadImage:

GUI_LoadImage ITExit

is expected to create (and return) an image named ITExit. What this function does, is:

a) Check if the image ITExit already exists. In this case, the functions simply returns, as the image has already been created.

b) Check in the directory of the current theme. If an image named ITExit.png exists, load it. If this fails, try ITExit.gif Any number of suffixes can be added here...

c) If (b) has failed, perform the same actions but in the diretory of the default theme

d) Finally, if everything of the above failed, then create an empty 1x1 image and named it ITExit.

So, with such a procedure, you can mix png & gif images as you wish.
My approach is to always use gif images in the defualt (and uglier) theme, and use png images in the rest of the themes. I usually prefer the png images, as they don't have the limitation of 256 colours per image and can look better, as they can have smoother shadows.

But, in case the img package is not available, my code can go an reuse the gifs, and the app at least runs :-)

George
.



Relevant Pages

  • Re: UI design for Tk app--PNGs or GIFs for icons?
    ... about the question of gif or png files for icons in a Tk application. ... GUI_LoadImage ITExit ... So, with such a procedure, you can mix png & gif images as you wish. ...
    (comp.lang.tcl)
  • Re: UI design for Tk app--PNGs or GIFs for icons?
    ... about the question of gif or png files for icons in a Tk application. ... GUI_LoadImage ITExit ... So, with such a procedure, you can mix png & gif images as you wish. ...
    (comp.lang.tcl)
  • Re: UI design for Tk app--PNGs or GIFs for icons?
    ... about the question of gif or png files for icons in a Tk application. ... I don't think there's ever a need to use GIF over PNG. ...
    (comp.lang.tcl)
  • A xp icons collections released!
    ... More than 300 XP icons designed specifically for database applications, business applications, internet applications and websites. ... .ICO, GIF, PNG ...
    (microsoft.public.windowsxp.customize)
  • Re: Publisher to Firefox
    ... I have the updated "PNG" versions online and they look great on Firefox. ... You need to remove the border art from the image and add it to a second text ... then I would guess that it will be superior to the poor quality GIF ... Please repost your question in the web design group and we will pursue it ...
    (microsoft.public.publisher)