Data transformations

If the input image is gray scale or color, and the output image type is bi-level (for example, IOCA FS10, or IM1), the transform internally scales the image to the desired size, then uses a halftoning algorithm (ordered dither, the default, or Floyd-Steinberg) to convert it to bi-level. In converting the image to bi-level, the characteristics of the output device, such as dot shape and dot gain, must be taken into consideration. The halftone screen and the calibration are extremely printer-dependent. While the transform does contain an internal default (85 LPI screen at 45 degrees), an appropriate screen should be used and the halftone should be calibrated properly for best quality.

Some printers, such as the InfoPrint® 4000, have two engines, one for each side of the sheet. Each engine commonly has a different calibration. Options -thresh and -gcorr provide the mechanism to specify halftone screen, gray scale correction curves, and rules for switching calibration based on the engine used to print a particular page. For very light or very dark images, the halftoning algorithms can be automatically recalibrated to preserve detail that would be lost using the default calibration. See option -alg.

To maintain the image quality, scaling must be done before halftoning. The halftoning algorithm is very compute-intensive. Unless the images are small, JPEG to AFP might not be able to process the color images fast enough to feed even a slow printer.

To achieve good image quality for the CMYK output, the input image colors must be converted to CMYK, bearing in mind the characteristics of the particular halftones used to generate the output image. The color conversion is done using a multidimensional lookup table, which is specified with the -lut option. If the transform cannot determine the appropriate lookup table or the lookup table is missing, a simple conversion of RBG to CMY is done using the 255- algorithm. This conversion does not use black and generally leads to poor color quality.

The size and the position of the output image on the page depends on several factors. In addition to the size specified to the transform, the result depends on the form map specified at print time and also on the form and options loaded in the printer. If the image is too large to fit on the page, it is trimmed to size by default. Use the -fit option to tell the printer to scale the image to paper size. If the paper size has not been specified explicitly with the –paper option, the paper defaults to US letter (8.5 by 11 inches). If the image is larger than this, the paper dimensions are increased as necessary. If the paper size has been specified explicitly, it is not increased if the image will not fit on paper. Options -l and -w have the same effect as -paper.

The size of the actual image, as opposed to the paper size, is controlled by the -scale option. The -scale option can either specify "orig", or give an actual size. If orig has been specified, the output image has the same size as the input image. If -scale with an actual size has been specified, the output image is scaled to the desired size. A percentage enlargement/reduction can also be specified.

Even if -scale orig has been specified, the image might still need to be scaled if the input resolution is different from the output resolution. By default, the transform leaves scaling to the printer. The exceptions are images that are being halftoned, which are always scaled in the transform, and images that have different resolutions on the X and Y directions. The -alg option can be used to instruct the transform to do internal image scaling. Options -alg and -ink choose and configure various scaling algorithms used by the transform.

Because JPEG files do not specify resolutions, the image is assumed to have the resolution of the output device.

If possible, jpeg2afp just rewraps the JPEG raster data in MO:DCA-P headers. This does not change the compression algorithm used in the data, even though it might be different than the output compression algorithm specified on the command line. The data is rewapped only if no changes are to be made in the image and if the compression algorithm is supported by the IOCA standard. Besides the uncompressed data, the bi-level compression algorithms supported both by JPEG and IOCA are ITU-TSS T.4 Group 3 and T.6 Group 4 algorithms.

For 8-bit grayscale and 24-bit color images, both TIFF and IOCA FS11 support JPEG compression algorithms. However, TIFF and JPEG standards have different subsampling defaults than IOCA FS11. Thus, most 24-bit color images are not suitable for rewrapping, even if they use a JPEG compression algorithm and a color model supported by IOCA FS11. Also, JPEG is a lossy compression algorithm. Decompressing a JPEG image and then recompressing it again for output might result in reduced image quality. For that reason, the default is to use no compression for the gray or color output.

Be aware that not all the printers support all the recognized IOCA compression standards. To make sure that the transform decompresses the data and recompresses it using the specified algorithm, use the -force option. If the output image is IM1, the image is always decompressed and scaled in the transform.

The JPEG images are often divided into many segments for efficient memory handling. Some printers terminate the printing in error if the page is too complex. For that reason, jpeg2afp decompresses, repartitions, and compresses the data if it determines there are too many segments in the picture.

Copyright © 2004, 2013