File formats
When an icon is saved for the first time a popup menu appears
that lists the various file types. When a file is subsequently opened IconPainter
works out what type of file it is and saves it back as that type. If you want to open
one type of file and save the image back as another type (eg. GIF to ICO) then using the
"Save as..." option in the "File" menu will do this.
GIF
GIF is a useful format for images used in all versions of Java as well as in internet
pages. Images restored with the GIF format are exact pixel-by-pixel copies of the original image ie. it
doesn't loose any image quality like JPEG. It's disadvantage is that it is limited to 256 colors and cannot save the true
color of which IconPainter is capable.
It's should be
noted that IconPainter saves transparent GIF's using the GIF89a format and the current
background color is set to be transparent. If you
open a GIF89a file that is not transparent then IconPainter will always save the icon back
as though it were transparent. To avoid this behaviour the user should select
"Save as..." and explicitly save the file as GIF87a which always has a solid
background. The format is lossless.
To avoid heavy financial and administrative penalties GIF's are written without using the
LZW compression technique, the patent for which is held by the UNISYS corporation. This means that icons will be slightly larger than necessary.
For small files like icons this extra size is negligible.
PNG
PNG offers perfect pixel by pixel copying like GIF with the added advantage it supports true color with it's
16 million color possibilities. All web browsers support PNG and the author recommends it as the best way to
save images created with IconPainter. See the special PNG, TIFF & PICT section
to understand how IconPainter creates and reads PNG.
TIFF
Widely used and widely feared some have described TIFF as the file format from hell. The reason is because the TIFF
specification's generaility makes TIFF codecs very hard to write. However there are a great many images out there in TIFF
but the author's view is that PNG or JPEG can do everything TIFF does.
Refer to the PNG, TIFF & PICT section for IconPainter's handling of TIFF's.
JPEG
JPEG does not restrict the number of colors in the image however it uses an averaging technique to achieve
compression and the aggressiveness (or quality) of this averaging can be changed.
The default behaviour is to save the image with the maximum
JPEG quaity of 1. To reduce the quality go to IconPainter's "Settings" menu. It should be noted that
even at maximum quality JPEG images will loose pixel information between opening and
saving a JPEG file ie. the format is not lossless. Normally JPEG's are rarely saved with a quality of 1.0 as
this results in minimal compression but as icon's are typically small images the loss of compression is not critical.
XBM and XPM
XBM and XPM formats are widely used on Unix systems. XPM was specifically developed for use
with the X-Windows GUI manager.
Both formats consist
of ASCII files that are in the form of "C" language programming source that can be included
directly into a larger program. Both can represent images of any dimension
but because of lack of compression only smaller images are usually stored this way.
XBM is a monochrome format while XPM supports any number
of colors with an optional hotspot for cursors.
For more information on IconPainter's handling of these formats see the
XPM section of this manual.
BMP
IconPainter uses the standard Microsoft formats for saving 8-bit and 24-bit BMP files. The 8-bit format saves up to
256 colors. The 24-bit format is useful for saving images in true color but does absolutely no compression. The format
is particularly good when using IconPainter to extract and edit portions of screen shots from screen capturing utilities.
These formats are lossless.
ICO
IconPainter supports WIndows ICO resource files that contain one or multiple icons. ICO images can contain
up to 256 colors and have a transparent background. An ICO file can contain images of sizes 16x16, 24x24,
32x32, 48x48 or 64x64 pixel dimension and multiple images of the same size. When using the
file chooser dialog to browse files the image displayed to the right of the dialog is the
first icon found in the ICO file no-matter what it's size. When opening such a file a
display of the various icons will be shown so that a choice about which one to open can be made.
When creating an ICO file with multiple images, save the first image into a new file. Then press the
"new" button to create a second image of a different size and then save the second image back to the
ICO file with the first image in it. Reply "Yes" to the question about overwriting the file.
When a new
icon is saved back to an existing ICO file IconPainter saves the image and replaces the first
icon in the file with the same dimension if one exists. If no icon with a matching dimension is
found IconPainter appends the image as a new icon to the file allowing ICO files to be built which contain the
multiple sizes.
ICO images are treated like transparent GIF's with regard to the background color ie. IconPainter's current
background color is treated as transparent in the final image. It is therefore better to
turn off antialiasing if the eventual background color for the image cannot be predicted.
It should be noted that complex
color schemes in Windows icons are often dithered by Windows95. IconPainter will never
attempt to dither when displaying ICO images. This format is lossless.
CUR
The Microsoft CUR format is the ICO format with additional hotspot information added. The above information
about ICO files also applies to CUR resource files with the additional note that when saving
a CUR file IconPainter will always prompt for the position of the hotspot even if
you are working on a previously created file. This format is of course lossless.
ANI
IconPainter supports the Microsoft animated cursor (ANI) format. ANI files are basically collections
of CUR image files with additional timing and sequencing information for the animation. As this is a more
complex subject there is a separate animated cursor section for more information.
A note on how IconPainter saves ICO,CUR and ANI files
When IconPainter saves any of image in ICO, CUR or ANI files it takes a simplistic approach to
how the image is saved by always saving as though there were 256 colors even if there aren't.
This means that
IconPainter generates Microsoft icon files which are often bigger than they need to be. For instance
a 32x32 pixel icon will always be written by IconPainter as 2238 bytes whereas if the icon only has 16 colors this
could in theory be reduced to 766 bytes. The amount of space consumed by icons is usually tiny
compared with the capacity of modern disk drives so the author considered this programming
simplification a reasonable approach. Send us an e-mail if you disagree!
PICT files
At the time of writing IconPainter is able to read the Apple PICT file format but not
write it. See the special PNG & PICT section for more details.