Re: RGSG - GNOMEprint and Icons



>  First, a question.  Is there any easy way (using imlib or something) do
>  have an inline PNG file?  By inline, I mean contained within the
>  executable code in a way that can be accessed, like you can with XPM
>  files.

I don't think that is needed, although it is no problem at all to
implement.  XPM is nice because it is actually designed to be inlined
in your code; you just #include the xpm file and you are done.  Pretty
much all GNOME applications that needs icons of their own (i.e. those
that are not taken from gnome-stock) use this method.

Applications which need something bigger than icons usually install
their stuff as PNG or JPEG files somewhere under the
$prefix/share/pixmaps directory.  The games are example of this, and
it has the advantage that you can add new images to the program
without recompiling.

>  In many cases, icons should not be kept as a separate file (eg,
>  lightweight programs where you want as few files as possible to worry
>  about distributing), so whatever format gets specified should be able to
>  be enveloped by the program, and PNG files are vastly superior to XPM
>  files, so I would prefer them.

As far as distribution is concerned, normal users will just download a
package file (rpm, deb, whatever) and install it, so concerns about
the number of distributed files are moot.

>  First, we define a set of allowable icon sizes (in pixels).  A particular 
>  icon need not support all of the list, but it must supply a contiguous
>  block (eg. all the lines between 48x48 and 8x8), even if some of the
>  sizes are left blank (here's where PNG would come in handy). I propose the
>  following list:

I don't think requiring several icon sizes is a good idea.  It puts
too much work on the icon designer.  If icons look bad when scaled up
or down, then it is a bug in the scaling algorithm used for icons.
The scaling algorithm should be changed, not the icons.

So far I think imlib does an acceptable job of scaling the icons that
are used throughout GNOME, although it could certainly be better
(i.e. averaging for downscaling, subsampling for upscaling).  Patches
to do this are welcome.

  Federico



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