logo
 

JPEG Files

 

File Type: Raster Image
File Extension : .jpg

Uses of the JPEG (Joint Photographic Experts Group) file format are far and wide. Initially, the file format was intended for use in Web applications, but has found a home in the high-end print production markets, as well.

A JPEG file is encoded by using an adjustable lossy compression approach. This means that to achieve smaller file sizes, image data is actually thrown away. In small doses, the JPEG compression approach can be very effective and efficient. However, in larger amounts, the resulting file will contain –noise” and undesired artifacts in the image. Be very careful when preparing JPEG files for use in a print production workflow.

The JPEG format will support the RGB, CMYK, and grayscale color spaces. The use of JPEG images is supported in HTML and Web applications. However, unlike a GIF file, all of the color information is stored in the file. There is no support for transparency in a JPEG file.

JPEG Quality and Compression

Uses of the JPEG (Joint Photographic Experts Group) file format are far and wide. Initially, the file format was intended for use in Web applications, but has found a home in the high-end print production markets, as well. The JPEG file format can be your best friend if used properly, or your worst enemy if implemented incorrectly.

A JPEG file is encoded by using an adjustable lossy compression approach. This means that to achieve smaller file sizes, image data is actually thrown away. In small doses, the JPEG compression approach can be very effective and efficient. However, in larger amounts, the resulting file will contain "noise" and undesired artifacts in the image.

As you apply greater amounts of JPEG compression, and image gets smaller in size. However at this reduction of file size comes the deterioration of image quality.

Since the lossy compression approach actually removes image data, once an image has been compressed (or over compressed), the damage done is permanent. If you try to open the over-compressed image in Photoshop and convert it to a TIFF image to repair the problem, you are only masking the true problem. Unfortunately there is no repair for an over compressed JPEG image.

Color Space

Computer monitors emit color as RGB (red, green, blue) light. Although all colors of the visible spectrum can be produced by merging red, green and blue light, monitors are capable of displaying only a limited gamut (i.e., range) of the visible spectrum.

Whereas monitors emit light, inked paper absorbs or reflects specific wavelengths. Cyan, magenta and yellow pigments serve as filters, subtracting varying degrees of red, green and blue from white light to produce a selective gamut of spectral colors. Like monitors, printing inks also produce a color gamut that is only a subset of the visible spectrum, although the range is not the same for both. Consequently, the same art displayed on a computer monitor may not match to that printed in a publication. Also, because printing processes such as offset lithography use CMYK (cyan, magenta, yellow, black) inks, digital art must be converted to CMYK color for print. Many printers now prefer digital art files be supplied in the RGB color space with ICC profiles attached. Images can then be converted to the CMYK color space by the printer using color management methods that honor profiles if present; this helps preserve the best possible detail and vibrancy.

Some printers may prefer your files be delivered in RGB with ICC profiles attached, as this allows the printer to use color management methods when converting to CMYK. Other printers may prefer your files in the CMYK (Cyan/Magenta/Yellow/Black) mode, as this is the mode required for the printing process. If an RGB (Red/Green/Blue) file is submitted, it must be converted to CMYK for print. When the conversion takes place, color shifts can occur and TSG will do our best to reproduce as close of a match to your printed output as possible.

The Color Space are 5 allowed:

  • RGB is separate RGB channels.

  • GRAYLEV is unique intensity channel (gray levels).

  • YCbCr three channels (CCIR Recommendation 601-1)

  • CMYK four channels (Cyan Magenta Yellow Black) - linear convertion

  • YCbCrK four channels (YCbCr and Black) 

DCT method

JPEG uses the Discrete Cosine Transform algorithm. The DCT method (Discrete Cosine Transform) is an area function that works on an 8 pixel by 8 pixel area. The DCT function works in these small blocks and optimises them for compression without any regard for the adjacent areas. this is he nature of noise in JPEG compression. In theory the method could produce a lossless image, but in actual practice it uses real numbers and some cannot be written exactly. (For example 1/3, or 0.33333333 ... etc. etc.) So some loss always occurs. Besides as you increase the quality of the compression, the amount of compression decreases. The trick is to find the point that represents good compression with acceptable loss.

DCT method there are 3 allowed:

  • ISLOW is slow but accurate integer algorithm.

  • IFAST is faster, less accurate integer method.

  • FLOAT is a floating-point method (machine dependent).

The fast integer method is much less accurate than the other two.
The float method is very slightly more accurate than the int method, but is much slower unless your machine has very fast floating-point hardware. Also note that results of the floating-point method may vary slightly across machines, while the integer methods should give the same results everywhere.

progressive JPEG

A simple or "baseline" JPEG file is stored as one top-to-bottom scan of the image. Progressive JPEG divides the file into a series of scans. The first scan shows the image at the equivalent of a very low quality setting, and therefore it takes very little space. Following scans gradually improve the quality. Each scan adds to the data already provided, so that the total storage requirement is roughly the same as for a baseline JPEG image of the same quality as the final scan. (Basically, progressive JPEG is just a rearrangement of the same data into a more complicated order.)

The advantage of progressive JPEG is that if an image is being viewed on-the-fly as it is transmitted, one can see an approximation to the whole image very quickly, with gradual improvement of quality as one waits longer; this is much nicer than a slow top-to-bottom display of the image. The disadvantage is that each scan takes about the same amount of computation to display as a whole baseline JPEG file would. So progressive JPEG only makes sense if one has a decoder that's fast compared to the communication link. (If the data arrives quickly, a progressive-JPEG decoder can adapt by skipping some display passes. Hence, those of you fortunate enough to have T1 or faster net links may not see any difference between progressive and regular JPEG; but on a modem-speed link, progressive JPEG is great.)

Up until recently, there weren't many applications in which progressive JPEG looked attractive, so it hasn't been widely implemented. But with the popularity of World Wide Web browsers running over slow modem links, and with the ever-increasing horsepower of personal computers, progressive JPEG has become a win for WWW use. IJG's free JPEG software now supports progressive JPEG, and the capability is spreading fast in WWW browsers and other programs.

Except for the ability to provide progressive display, progressive JPEG and baseline JPEG are basically identical, and they work well on the same kinds of images. It is possible to convert between baseline and progressive representations of an image without any quality loss. (But specialized software is needed to do this; conversion by decompressing and recompressing is *not* lossless, due to roundoff errors.)

A progressive JPEG file is not readable at all by a baseline-only JPEG decoder, so existing software will have to be upgraded before progressive JPEG can be used widely. See item 16 in part 2 for the latest news about which programs support it.

Smoothing

The smoothing slider adjusts how much the image is blurred to make the image appear a higher quality. A higher value will lose some of the detail in an image, but reduce the filesize.

The -smooth option filters the input to eliminate fine-scale noise. This is often useful when converting GIF files to JPEG: a moderate smoothing factor of 10 to 50 gets rid of dithering patterns in the input file, resulting in a smaller JPEG file and a better-looking image. Too large a smoothing factor will visibly blur the image, however.