pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Icons [was: Re: Using "-O1 -g" to debug optimisation bugs in Mingw.]


From: John Darrington
Subject: Icons [was: Re: Using "-O1 -g" to debug optimisation bugs in Mingw.]
Date: Wed, 4 Apr 2007 14:15:44 +0800
User-agent: Mutt/1.5.9i

On Wed, Apr 04, 2007 at 01:49:49PM +0800, John McCabe-Dansted wrote:

     Windows likes an .ico to be linked into the executable. This .ico file
     actually contains a number of different icons, each for a different
     colour depth and resolution so that windows can pick the appropriate
     icon based upon the version of windows, the colour depth of the screen
     and the desired size of the icon. We use this icon for viewing the
     .exe file, for the start menu link and for the task bar (I think).
     
     This icon should really be tested on both Windows 2000 and XP they are
     different (I think XP allows icons to have partially transparent
     pixels), although if the icon doesn't work correctly it shouldn't
     cause any problems other than a bit of uglyness.

     It seems that the best way to make such an .ico file is to use the
     GIMP which treats each subicon as a different layer. This is a little
     clumsy since you only want to have one layer visible at a time.
     However the GIMP seems to allow you to create .ico files that support
     the new XP features, which the other open source options (e.g.
     png2ico) do not seem to do. Plus GIMP is ubiquitous, and has a GUI if
     that is your thing.

GTK works in a similar way, but it doesn't put the different scales
into the same file.  Instead there is a type called GtkIconSet, which
contains one or more GtkIconSource objects.  These are then in turn
put into a GtkIconFactory which can be used to produce the most
appropriate icon for a particular situation.

I'm not a graphic designer, but I experimented using Gimp for icon
design, and the results, I believe, were less than satisfactory.  I
found the best way was to design the icon using a vector graphics tool
such as Sodipodi or Inkscape, then export the graphic into a bitmap
format at whatever size/colourmap you need, (after making whatever
optimisations considered desirable).  The advantage of this method is
that you get the benefit of antialiasing which make small images like
icons much more aesthetically pleasing.  Whilst there are tools to
make this job easier, it can't be totally automated, since it's really
more of an artistic exercise than a programmatic one.

It sounds like the best way to produce ico files  would be to have the
build process amalgamate the individual png files into a single *.ico
file. 

J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.


Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]