↑Home |
For bitmap graphics an image is divided into (normally) square sections. Each of these pixels can be described by a set of numeric values.
The number of numeric values for each pixel and the interpretation depends on the color space. Some example color spaces are:
The color depth (sometimes referred to as "bits per component") is the number of bits for the gray/color and alpha values.
In grayscale color space using 1 bit per component we can only express 0 and 1 (black and white). The use of 4 bits per components allows 16 shades 0000 (decimal 0, black), 0001, ...., 1110 (decimal 14), 1111 (decimal 15, white).
Some bitmap graphics file formats (i.e. GIF) use a color palette (color table). This table contains the color values for i.e. 256 colors. Pixel data consists of one number per pixel, the index in the color table.
A vector graphics consists of drawing instructions like "draw a 1mm wide line from starting point Ps(xs,ys) to end point Pe(xe,ye) as solid line in black color."
On screens and printers vector graphics are converted into bitmap graphics for the device. The information about original paths, line widths and other graphics attributes allows optimized rendering on different targets depending on the target device's resolution and the zoom factor.
Vector graphics are scalable.
WXD files (*.wxd) are vector graphics files produced by the wxdkdraw program.
A *.wxd file can reference (import) bitmap graphics files.
Fig files (*.fig) are vector graphics files produced by XFig, jFig, or WinFIG.
A *.fig file can reference (import) bitmap graphics files.
Gnuplot is a program for mathematical plotting. Input files for Gnuplot are text files containing instructions to set up the plot.
If you want to use a *.gp file with the gxhconvert script, make sure the *.gp file does not contain
set terminal ... set output "..."
lines.
Terminal type and output file name are passed to gnuplot using the -e option by gxhconvert, depending on the output file type and other options you provided to gxhconvert.
SVG (*.svg, *.svgz, *.svg.gz) is a vector graphics file format, developed by Adobe, Inc.
SVG files can reference bitmap image files.
For conversions we have to consider three flavors of SVG:
For conversion paths we have to distinguish between Inkscape+LaTeX SVG files and SVG without LaTeX.
To use Inkscape+LaTeX SVG files with gxhconvert, make sure the file names end on "-il.svg", "-il.svgz", or "-il.svg.gz".
A LaTeX document (*.tex) is a complete *.tex file one can process using latex or pdflatex. It can contain one or multiple LaTeX images.
A LaTeX document for one image may have one or two supporting files.
A LaTeX image (*.tex) is a file containing LaTeX/TeX instructions for an image. Typically it loads a supporting PDF or EPS file containing the non-text graphics elements and typesets text labels on top of it.
The
\input{image.tex}
instruction (optionally embedded into a figure environment) is used in the LaTeX document to include the image.
Typical examples are:
PDF (*.pdf) is a graphics format developed by Adobe, Inc.
It can contain both vector and bitmap graphics elements.
The intended purpose is electronic document exchange.
PS (*.ps, *.eps) is a graphics format developed by Adobe, Inc.
It can contain both vector and bitmap graphics elements.
You can send a PS file directly to a PostScript printer, it is a printer language.
EPS is a subset of PS, intended to include images into print jobs.
PNG (*.png) is a lossless bitmap image graphics format.
JPEG (*.jpg, *.jpeg) is a lossy bitmap image graphics format using DCT-based compression. You should use it for photograms only.
A quality parameter in the range 0%...100% can be used to control the image quality. Normaly you will use values in the range 80%...95%. Values below 25% or above 98% are not recommended.
For Ghostscript the quality parameter is not in percent, the range 0.0 ... 1.0 is used instead.
The interpretation of the quality parameter depends on the software used to generate JPEG files. Interpretation differs significantly between a widely used commercial program and programs using libjpeg.
In an environment focused on libjpeg-based software you can retrieve an approximation for a JPEG images quality parameter by running the
identify -format '%Q' yourimage.jpg
command. The identify program is in the ImageMagick package.
TIFF (*.tif, *.tiff) is a bitmap image graphics format allowing multiple frames (images) in one file. Different compression mechanisms (both lossless and lossy) are available.
The TIFF V6.0 baseline standard lists a number of TIFF tags but some software vendors use their own non-standard TIFF tags when writing TIFF files. When processing TIFF files you should not be suprised when reading "unsupported TIFF tag" messages.
If you have a choice I recommend to avoid the TIFF file format, use PNG or JPEG instead.
An icon file contains multiple bitmaps of different size and color depth. We have to prepare all these bitmap/pixmaps.
If you ask which sizes and colors are required in an icon for a Windows application, opinions differ:
Our procedures to create an ICO file also include the creation of a 32x32 pixels XPM file for use as application icon on non-Windows systems.
Icon files can have an image mask (each pixel is either fully opaque or fully transparent). When converting vector graphics formats (Fig, Gnuplot, PDF, PS/EPS, SVG) or images containing an alpha channel (PNG, TIFF) to ICO the image is mixed against a white background. Optionally we can create an image mask from alpha channel transparency data or from information about unused regions.
XPM is a bitmap image file type saving the image data as C source code (array of C strings). The wxWidgets libraries use XPM images for toolbar button images (width: 16 pixels, height: 15 pixels) and for application icons on non-Windows systems (width and height: 32 pixels).
When producing an XPM file using ppmtoxpm we have to specify a "-name name" option. The name must be a valid identifier in the C programming language.
The gxhconvert script uses xpm_filename where filename is the input file name without suffix with some corrections applied (minus and dots are replaced by underscores).
XPM files can have an image mask (each pixel is either fully opaque or fully transparent). When converting vector graphics formats (Fig, Gnuplot, PDF, PS/EPS, SVG) or images containing an alpha channel (PNG, TIFF) to XPM the image is mixed against a white background. Optionally we can create an image mask from alpha channel transparency data or from information about unused regions.
↑Home |