Home » Archimedes archive » Acorn User » AU 1997-Xmas B.adf » PD » MakeJPEG/FAQ/JPEGFAQ1
MakeJPEG/FAQ/JPEGFAQ1
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1997-Xmas B.adf » PD |
Filename: | MakeJPEG/FAQ/JPEGFAQ1 |
Read OK: | ✔ |
File size: | B7E8 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Archive-name: jpeg-faq/part1 Posting-Frequency: every 14 days Last-modified: 3 September 1995 This article answers Frequently Asked Questions about JPEG image compression. This is part 1, covering general questions and answers about JPEG. Part 2 gives system-specific hints and program recommendations. As always, suggestions for improvement of this FAQ are welcome. New since version of 6 August 1995: * Updated entry on progressive JPEG. This article includes the following sections: Basic questions: [1] What is JPEG? [2] Why use JPEG? [3] When should I use JPEG, and when should I stick with GIF? [4] How well does JPEG compress images? [5] What are good "quality" settings for JPEG? [6] Where can I get JPEG software? [7] How do I view JPEG images posted on Usenet? More advanced questions: [8] What is color quantization? [9] What are some rules of thumb for converting GIF images to JPEG? [10] Does loss accumulate with repeated compression/decompression? [11] What is progressive JPEG? [12] Isn't there a lossless JPEG? [13] Why all the argument about file formats? [14] How do I recognize which file format I have, and what do I do about it? [15] How does JPEG work? [16] What about arithmetic coding? [17] Could an FPU speed up JPEG? How about a DSP chip? [18] Isn't there an M-JPEG standard for motion pictures? [19] What if I need more than 8-bit precision? Miscellaneous: [20] Where are FAQ lists archived? This article and its companion are posted every 2 weeks. If you can't find part 2, you can get it from the news.answers archive at rtfm.mit.edu (see "[20] Where are FAQ lists archived?"). Part 2 changes very frequently; get a new copy if the one you are reading is more than a couple months old. ------------------------------ Subject: [1] What is JPEG? JPEG (pronounced "jay-peg") is a standardized image compression mechanism. JPEG stands for Joint Photographic Experts Group, the original name of the committee that wrote the standard. JPEG is designed for compressing either full-color or gray-scale images of natural, real-world scenes. It works well on photographs, naturalistic artwork, and similar material; not so well on lettering, simple cartoons, or line drawings. JPEG handles only still images, but there is a related standard called MPEG for motion pictures. JPEG is "lossy," meaning that the decompressed image isn't quite the same as the one you started with. (There are lossless image compression algorithms, but JPEG achieves much greater compression than is possible with lossless methods.) JPEG is designed to exploit known limitations of the human eye, notably the fact that small color changes are perceived less accurately than small changes in brightness. Thus, JPEG is intended for compressing images that will be looked at by humans. If you plan to machine-analyze your images, the small errors introduced by JPEG may be a problem for you, even if they are invisible to the eye. A useful property of JPEG is that the degree of lossiness can be varied by adjusting compression parameters. This means that the image maker can trade off file size against output image quality. You can make *extremely* small files if you don't mind poor quality; this is useful for applications such as indexing image archives. Conversely, if you aren't happy with the output quality at the default compression setting, you can jack up the quality until you are satisfied, and accept lesser compression. Another important aspect of JPEG is that decoders can trade off decoding speed against image quality, by using fast but inaccurate approximations to the required calculations. Some viewers obtain remarkable speedups in this way. ------------------------------ Subject: [2] Why use JPEG? There are two good reasons: to make your image files smaller, and to store 24-bit-per-pixel color data instead of 8-bit-per-pixel data. Making image files smaller is a win for transmitting files across networks and for archiving libraries of images. Being able to compress a 2 Mbyte full-color file down to, say, 100 Kbytes makes a big difference in disk space and transmission time! And JPEG can easily provide 20:1 compression of full-color data. If you are comparing GIF and JPEG, the size ratio is usually more like 4:1 (see "[4] How well does JPEG compress images?"). If your viewing software doesn't support JPEG directly, you'll have to convert JPEG to some other format to view the image. Even with a JPEG-capable viewer, it takes longer to decode and view a JPEG image than to view an image of a simpler format such as GIF. Thus, using JPEG is essentially a time/space tradeoff: you give up some time in order to store or transmit an image more cheaply. But it's worth noting that when network or telephone transmission is involved, the time savings from transferring a shorter file can be greater than the time needed to decompress the file. The second fundamental advantage of JPEG is that it stores full color information: 24 bits/pixel (16 million colors). GIF, the other image format widely used on Usenet, can only store 8 bits/pixel (256 or fewer colors). GIF is reasonably well matched to inexpensive computer displays --- most run-of-the-mill PCs can't display more than 256 distinct colors at once. But full-color hardware is getting cheaper all the time, and JPEG images look *much* better than GIFs on such hardware. Within a couple of years, GIF will probably seem as obsolete as black-and-white MacPaint format does today. Furthermore, JPEG is far more useful than GIF for exchanging images among people with widely varying display hardware, because it avoids prejudging how many colors to use (see "[8] What is color quantization?"). Hence JPEG is considerably more appropriate than GIF for use as a Usenet posting standard. A lot of people are scared off by the term "lossy compression". But when it comes to representing real-world scenes, *no* digital image format can retain all the information that impinges on your eyeball. By comparison with the real-world scene, JPEG loses far less information than GIF. The real disadvantage of lossy compression is that if you repeatedly compress and decompress an image, you lose a little quality each time (see "[10] Does loss accumulate with repeated compression/decompression?"). This is a serious objection for some applications but matters not at all for many others. ------------------------------ Subject: [3] When should I use JPEG, and when should I stick with GIF? JPEG is *not* going to displace GIF entirely; for some types of images, GIF is superior in image quality, file size, or both. One of the first things to learn about JPEG is which kinds of images to apply it to. Generally speaking, JPEG is superior to GIF for storing full-color or gray-scale images of "realistic" scenes; that means scanned photographs and similar material. Any continuous variation in color, such as occurs in highlighted or shaded areas, will be represented more faithfully and in less space by JPEG than by GIF. GIF does significantly better on images with only a few distinct colors, such as line drawings and simple cartoons. Not only is GIF lossless for such images, but it often compresses them more than JPEG can. For example, large areas of pixels that are all *exactly* the same color are compressed very efficiently indeed by GIF. JPEG can't squeeze such data as much as GIF does without introducing visible defects. (One implication of this is that large single-color borders are quite cheap in GIF files, while they are best avoided in JPEG files.) Computer-drawn images, such as ray-traced scenes, usually fall between photographs and cartoons in terms of complexity. The more complex and subtly rendered the image, the more likely that JPEG will do well on it. The same goes for semi-realistic artwork (fantasy drawings and such). But icons that use only a few colors are handled better by GIF. JPEG has a hard time with very sharp edges: a row of pure-black pixels adjacent to a row of pure-white pixels, for example. Sharp edges tend to come out blurred unless you use a very high quality setting. Edges this sharp are rare in scanned photographs, but are fairly common in GIF files: consider borders, overlaid text, etc. The blurriness is particularly objectionable with text that's only a few pixels high. If you have a GIF with a lot of small-size overlaid text, don't JPEG it. (If you want to attach descriptive text to a JPEG image, put it in as a comment rather than trying to overlay it on the image. Most recent JPEG software can deal with textual comments in a JPEG file, although older viewers may just ignore the comments.) Plain black-and-white (two level) images should never be converted to JPEG; they violate all of the conditions given above. You need at least about 16 gray levels before JPEG is useful for gray-scale images. It should also be noted that GIF is lossless for gray-scale images of up to 256 levels, while JPEG is not. If you have a large library of GIF images, you may want to save space by converting the GIFs to JPEG. This is trickier than it may seem --- even when the GIFs contain photographic images, they are actually very poor source material for JPEG, because the images have been color-reduced. Non-photographic images should generally be left in GIF form. Good-quality photographic GIFs can often be converted with no visible quality loss, but only if you know what you are doing and you take the time to work on each image individually. Otherwise you're likely to lose a lot of image quality or waste a lot of disk space ... quite possibly both. Read sections 8 and 9 if you want to convert GIFs to JPEG. ------------------------------ Subject: [4] How well does JPEG compress images? Very well indeed, when working with its intended type of image (photographs and suchlike). For full-color images, the uncompressed data is normally 24 bits/pixel. The best known lossless compression methods can compress such data about 2:1 on average. JPEG can typically achieve 10:1 to 20:1 compression without visible loss, bringing the effective storage requirement down to 1 to 2 bits/pixel. 30:1 to 50:1 compression is possible with small to moderate defects, while for very-low-quality purposes such as previews or archive indexes, 100:1 compression is quite feasible. An image compressed 100:1 with JPEG takes up the same space as a full-color one-tenth-scale thumbnail image, yet it retains much more detail than such a thumbnail. For comparison, a GIF version of the same image would start out by sacrificing most of the color information to reduce the image to 256 colors (8 bits/pixel). This provides 3:1 compression. GIF has additional "LZW" compression built in, but LZW doesn't work very well on typical photographic data; at most you may get 5:1 compression overall, and it's not at all uncommon for LZW to be a net loss (i.e., less than 3:1 overall compression). LZW *does* work well on simpler images such as line drawings, which is why GIF handles that sort of image so well. When a JPEG file is made from full-color photographic data, using a quality setting just high enough to prevent visible loss, the JPEG will typically be a factor of four or five smaller than a GIF file made from the same data. Gray-scale images do not compress by such large factors. Because the human eye is much more sensitive to brightness variations than to hue variations, JPEG can compress hue data more heavily than brightness (gray-scale) data. A gray-scale JPEG file is generally only about 10%-25% smaller than a full-color JPEG file of similar visual quality. But the uncompressed gray-scale data is only 8 bits/pixel, or one-third the size of the color data, so the calculated compression ratio is much lower. The threshold of visible loss is often around 5:1 compression for gray-scale images. The exact threshold at which errors become visible depends on your viewing conditions. The smaller an individual pixel, the harder it is to see an error; so errors are more visible on a computer screen (at maybe 70 dots/inch) than on a high-quality color printout (300 or more dots/inch). Thus a higher-resolution image can tolerate more compression ... which is fortunate considering it's much bigger to start with. The numbers quoted above are typical for screen viewing. Also note that the threshold of visible error varies considerably across images. ------------------------------ Subject: [5] What are good "quality" settings for JPEG? Most JPEG compressors let you pick a file size vs. image quality tradeoff by selecting a quality setting. There seems to be widespread confusion about the meaning of these settings. "Quality 95" does NOT mean "keep 95% of the information", as some have claimed. The quality scale is purely arbitrary; it's not a percentage of anything. In fact, quality scales aren't even standardized across JPEG programs. The quality settings discussed in this article apply to the free IJG JPEG software (described in part 2), and to many programs based on it. Other JPEG implementations, notably Apple's and HSI's, use completely different quality scales; for instance, Apple's scale runs from 0-4, not 0-100. Some programs don't even provide a numeric scale, just "high"/"medium"/"low" style choices. (Fortunately, this doesn't prevent different implementations from exchanging compressed files.) In most cases the user's goal is to pick the lowest quality setting, or smallest file size, that decompresses into an image indistinguishable from the original. This setting will vary from one image to another and from one observer to another, but here are some rules of thumb. For good-quality, full-color source images, the default IJG quality setting (Q 75) is very often the best choice. This setting is about the lowest you can go without expecting to see defects in a typical image. Try Q 75 first; if you see defects, then go up. If the image was less than perfect quality to begin with, you might be able to drop down to Q 50 without objectionable degradation. On the other hand, you might need to go to a *higher* quality setting to avoid further loss. This is often necessary if the image contains dithering or moire patterns (see "[9] What are some rules of thumb for converting GIF images to JPEG?"). Except for experimental purposes, never go above about Q 95; using Q 100 will produce a file two or three times as large as Q 95, but of hardly any better quality. If you see a file made with Q 100, it's a pretty sure sign that the maker didn't know what he/she was doing. If you want a very small file (say for preview or indexing purposes) and are prepared to tolerate large defects, a Q setting in the range of 5 to 10 is about right. Q 2 or so may be amusing as "op art". (It's worth mentioning that the current IJG software is not optimized for such low quality factors. Future versions may achieve better image quality for the same file size at low quality settings.) ------------------------------ Subject: [6] Where can I get JPEG software? See part 2 of this FAQ for recommendations about programs for particular systems. Part 2 also tells where to find free C source code for implementing JPEG, in case you want to write your own programs using JPEG. The comp.graphics.* FAQs and the alt.binaries.pictures FAQ are more general sources of information about graphics programs available on the Internet (see "[20] Where are FAQ lists archived?"). ------------------------------ Subject: [7] How do I view JPEG images posted on Usenet? Image files posted on the alt.binaries.pictures.* newsgroups are usually "uuencoded". Uuencoding converts binary image data into text that can safely be posted. Most posters also divide large posts into multiple parts, since some news software can't cope with big articles. Before your viewer will recognize the image, you must combine the parts into one file and run the text through a uudecode program. (This is all true for GIF as well as JPEG, by the way.) There are programs available to automate this process. For more info see the alt.binaries.pictures FAQ, which is available from rtfm.mit.edu:/pub/usenet/news.answers/pictures-faq/part[1-3], or on WWW at http://www.cis.ohio-state.edu/hypertext/faq/usenet/pictures-faq/top.html (see also "[20] Where are FAQ lists archived?"). ------------------------------ Subject: [8] What is color quantization? Most people don't have full-color (24 bit per pixel) display hardware. Typical display hardware stores 8 or fewer bits per pixel, so it can display 256 or fewer distinct colors at a time. To display a full-color image, the computer must choose an appropriate set of representative colors and map the image into these colors. This process is called "color quantization". (This is something of a misnomer; "color selection" or "color reduction" would be a better term. But we're stuck with the standard usage.) Clearly, color quantization is a lossy process. It turns out that for most images, the details of the color quantization algorithm have *much* more impact on the final image quality than do any errors introduced by JPEG itself (except at the very lowest JPEG quality settings). Making a good color quantization method is a black art, and no single algorithm is best for all images. Since JPEG is a full-color format, displaying a color JPEG image on 8-bit-or-less hardware requires color quantization. The speed and image quality of a JPEG viewer running on such hardware are largely determined by its quantization algorithm. Depending on whether a quick-and-dirty or good-but-slow method is used, you'll see great variation in image quality among viewers on 8-bit displays, much more than occurs on 24-bit displays. On the other hand, a GIF image has already been quantized to 256 or fewer colors. (A GIF always has a specific number of colors in its palette, and the format doesn't allow more than 256 palette entries.) GIF has the advantage that the image maker precomputes the color quantization, so viewers don't have to; this is one of the things that make GIF viewers faster than JPEG viewers. But this is also the *disadvantage* of GIF: you're stuck with the image maker's quantization. If the maker quantized to a different number of colors than what you can display, you'll either waste display capability or else have to requantize to reduce the number of colors (which usually results in much poorer image quality than quantizing once from a full-color image). Furthermore, if the maker didn't use a high-quality color quantization algorithm, you're out of luck --- the image is ruined. For this reason, JPEG promises significantly better image quality than GIF for all users whose machines don't match the image maker's display hardware. JPEG's full color image can be quantized to precisely match the viewer's display hardware. Furthermore, you will be able to take advantage of future improvements in quantization algorithms, or purchase better display hardware, to get a better view of JPEG images you already have. With a GIF, you're stuck forevermore with what was sent. A growing number of people have better-than-8-bit display hardware already: 15-bit "hi-color" PC displays, true 24-bit displays on workstations and Macintoshes, etc. For these people, GIF is already obsolete, as it cannot represent an image to the full capabilities of their display. JPEG images can drive these displays much more effectively. In short, JPEG is an all-around better choice than GIF for representing photographic images in a machine-independent fashion. It's sometimes thought that a JPEG converted from a GIF shouldn't require color quantization. This is false: even when you feed a 256-or-less-color GIF into JPEG, what comes out of the decompressor is not 256 colors, but thousands of colors. This happens because JPEG's lossiness affects each pixel a little differently, so two pixels that started with identical colors will usually come out with slightly different colors. Considering the whole image, each original color gets "smeared" into a group of nearby colors. Therefore quantization is always required to display a color JPEG on a colormapped display, regardless of the image source. The same effect makes it nearly meaningless to talk about the number of colors used by a JPEG image. Even if you tried to count the number of distinct pixel values, different JPEG decoders would give you different results because of roundoff error differences. I occasionally see posted images described as "256-color JPEG". This tells me that the poster (a) hasn't read this FAQ and (b) probably converted the JPEG from a GIF. JPEGs can be classified as color or gray-scale, but number of colors just isn't a useful concept for JPEG, any more than it is for a real photograph. ------------------------------ Subject: [9] What are some rules of thumb for converting GIF images to JPEG? Converting GIF files to JPEG is a tricky business --- you are piling one set of limitations atop a quite different set, and the results can be awful. Certainly a JPEG made from a GIF will never be as good as a JPEG made from true 24-bit color data. But if what you've got is GIFs, and you need to save space, here are some hints for getting the best results. With care and a clean source image, it's often possible to make a JPEG of quality equivalent to the GIF. This does not mean that the JPEG looks pixel-for-pixel identical to the GIF --- it won't. Especially not on an 8-bit display, because the color quantization process used to display the JPEG probably won't quite match the quantization process used to make the GIF from the original data (see "[8] What is color quantization?"). But remember that the GIF itself is not all that faithful to the full-color original, if you look at individual pixels. Looking at the overall image, a converted JPEG can look as good as its GIF source. Some people claim that on 24-bit displays, a carefully converted JPEG can actually look better than the GIF source, because dither patterns have been eliminated. (More about dithering in a moment.) On the other hand, JPEG conversion absolutely *will* degrade an unsuitable image or one that is converted carelessly. If you are not willing to take the amount of trouble suggested below, you're much better off leaving your GIF images alone. Simply cranking the JPEG quality setting up to a very high value wastes space (which defeats the whole point of the exercise, no?) and some images will be degraded anyway. The first rule is never to convert an image that's not appropriate for JPEG (see "[3] When should I use JPEG, and when should I stick with GIF?"). Large, high-visual-quality photographic images are usually the best source material. And they take up lots of space in GIF form, so they offer significant potential space savings. (A good rule of thumb is not to bother converting any GIF that's much under 100 Kbytes; the potential savings isn't worth the hassle.) The second rule is to look at each JPEG, to make sure you are happy with it, before throwing away the corresponding GIF. This will give you a chance to re-do the conversion with a higher quality setting if necessary. Also compare the file sizes --- if the image isn't suitable JPEG material, a JPEG file of reasonable quality may come out *larger* than the GIF. The third rule is to get rid of the border. Many people have developed an odd habit of putting a large single-color border around a GIF image. While useless, this is nearly free in terms of storage cost in GIF files. It is *not* free in JPEG files, either in storage space or in decoding time. Worse, the sharp border boundary can create visible artifacts ("ghost" edges). Furthermore, when viewing a bordered JPEG on an 8-bit display, the quantizer will think the border color is important because there's so much of it, and hence will waste color palette entries on the border, thus actually reducing the displayed quality of the main part of the image! So do yourself a favor and crop off any border before JPEGing. The fourth rule is to know where the image came from. Repeated GIF<=>JPEG conversions are guaranteed to turn an image into mush, because you pay a quality-loss price on each round trip. Don't reconvert images that have been converted before. Gray-scale images usually convert without much problem. When using cjpeg, be sure to use the -gray switch. (Otherwise, cjpeg treats a GIF as color data; this works, but it wastes space and time if the image is really only gray-scale.) Quality settings around the default (75) are usually fine. Color images are much trickier. Color GIFs of photographic images are usually "dithered" to fool your eye into seeing more than the 256 colors that GIF can actually store. If you enlarge the image, you will find that adjacent pixels are often of significantly different colors; at normal size the eye averages these pixels together to produce the illusion of an intermediate color value. The trouble with dithering is that, to JPEG, it looks like high-spatial-frequency color noise; and JPEG can't compress noise very well. The resulting JPEG file is both larger and of lower image quality than what you would have gotten from JPEGing the original full color image (if you had it). To get around this, you need to "smooth" the GIF image before compression. Smoothing averages together nearby pixels, thus approximating the color that you thought you saw anyway, and in the process getting rid of the rapid color changes that give JPEG trouble. Proper use of smoothing will both reduce the size of the compressed file and give you a better-looking output image than you'd get without smoothing. With the IJG JPEG software (cjpeg or derived programs), a simple smoothing capability is built in. Try "-smooth 10" or so when converting GIFs. Values of 10 to 25 seem to work well for high-quality GIFs. GIFs with heavy-handed dithering may require larger smoothing factors. (If you can see regular fine-scale patterns on the GIF image even without enlargement, then strong smoothing is definitely called for.) Too large a smoothing factor will blur the output image, which you don't want. If you are an image processing wizard, you can also do smoothing with a separate filtering program, but appropriate use of such tools is beyond the scope of this FAQ. Quality settings around 85 (a bit higher than default) usually work well when converting color GIFs, assuming that you've picked a good smoothing factor. You may need still higher quality settings if you can't hide the dithering pattern with a reasonable smoothing factor. Really badly dithered GIFs are best left as GIFs. Don't expect JPEG files converted from GIFs to be as small as those created directly from full-color originals. The dithering noise wastes space, but you won't be able to smooth away all the noise without blurring the image. Typically, a good-quality converted JPEG will be one-half to one-third the size of the GIF file, not one-fourth as suggested in section 4. If the JPEG comes out much more than half the size of the GIF, this is a good sign that the image shouldn't be converted at all. The upshot of all this is that "cjpeg -quality 85 -smooth 10" is probably a good starting point for converting color GIFs. But if you care about the image, you'll want to check the results and maybe try a few other settings. Blindly converting a large GIF library at this or any other setting is a recipe for disaster. ------------------------------ Subject: [10] Does loss accumulate with repeated compression/decompression? It would be nice if, having compressed an image with JPEG, you could decompress it, manipulate it (crop off a border, say), and recompress it without any further image degradation beyond what you lost initially. Unfortunately THIS IS NOT THE CASE. In general, recompressing an altered image loses more information. Hence it's important to minimize the number of generations of JPEG compression between initial and final versions of an image. It turns out that if you decompress and recompress an image at the same quality setting first used, little or no further degradation occurs. This means that you can make local modifications to a JPEG image without material degradation of other areas of the image. The areas you change will degrade, however. Counterintuitively, this works better the lower the quality setting. But you must use *exactly* the same setting, or all bets are off. Also, the decompressed image must be saved in a full-color format; if you do JPEG=>GIF=>JPEG, the color quantization step loses lots of information. Unfortunately, cropping doesn't count as a local change! JPEG processes the image in small blocks, and cropping usually moves the block boundaries, so that the image looks completely different to JPEG. You can take advantage of the low-degradation behavior if you are careful to crop the top and left margins only by a multiple of the block size (typically 16 pixels), so that the remaining blocks start in the same places. The bottom line is that JPEG is a useful format for archival storage and transmission of images, but you don't want to use it as an intermediate format for sequences of image manipulation steps. Use a lossless 24-bit format (PPM, RLE, TIFF, etc) while working on the image, then JPEG it when you are ready to file it away. Aside from avoiding degradation, you will save a lot of compression/decompression time this way :-). ------------------------------ Subject: [11] What is progressive JPEG? A simple or "baseline" JPEG file is stored as one top-to-bottom scan of the image. Progressive JPEG allows the image to be stored as a series of scans of increasing quality. The first scan shows the image at the equivalent of a very low quality setting, and therefore it takes very little space. Successive scans improve the quality. Each scan adds to the data already provided, so that the total storage requirement is about 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, the viewer sees 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 much faster than the communication link. 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 WWW browsers running over slow modem links, and with the ever-increasing horsepower of personal computers, progressive JPEG looks like a win for WWW. IJG's free JPEG software (see part 2) now supports progressive JPEG, and I expect that the capability will start to appear in WWW browsers over the next few months (fall/winter 1995). 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. ------------------------------ Subject: [12] Isn't there a lossless JPEG? There's a great deal of confusion on this subject. The JPEG standard does include a truly lossless compression algorithm, i.e., one that guarantees its decompressed output is bit-for-bit identical to the original input. However, this lossless mode has almost nothing in common with the regular lossy JPEG algorithm, and it offers much less compression. Lossless JPEG typically compresses full-color data by around 2:1. Lossless JPEG works well only on continuous-tone images; it does not provide useful compression of palette-color images or low-bit-depth images. (Early results with the new PNG standard suggest that PNG outcompresses lossless JPEG on most images. Once PNG becomes common, lossless JPEG will probably be obsolete.) There are very few implementations of true lossless JPEG. The PVRG code mentioned in part 2 handles lossless JPEG. Another free implementation is available from ftp.cs.cornell.edu:/pub/multimed/ljpg.tar.Z. This is a smaller program that handles *only* lossless JPEG. Cranking a regular JPEG implementation up to its maximum quality setting *does not* get you lossless storage; lossless JPEG is a fundamentally different method. Even at the maximum possible quality setting, regular JPEG cannot be lossless because it is subject to roundoff errors in various calculations. The roundoff errors are nearly always too small to be seen, but they will accumulate if you put the image through multiple cycles of compression. Many implementations won't even let you get to the maximum possible setting, because it's such an inefficient way to use regular JPEG. With the IJG JPEG software, for example, you have to say not only "-quality 100" but also "-sample 1x1" to eliminate all deliberate loss of information. The resulting files are far larger and of only fractionally better quality than files generated at more reasonable settings. And they're still slightly lossy! If you really need lossless storage, don't try to approximate it with regular JPEG. ------------------------------ Subject: [13] Why all the argument about file formats? Strictly speaking, JPEG refers only to a family of compression algorithms; it does *not* refer to a specific image file format. The JPEG committee was prevented from defining a file format by turf wars within the international standards organizations. Since we can't actually exchange images with anyone else unless we agree on a common file format, this leaves us with a problem. In the absence of official standards, a number of JPEG program writers have just gone off to "do their own thing", and as a result their programs aren't compatible with anyone else's. The closest thing we have to a standard JPEG format is some work that's been coordinated by people at C-Cube Microsystems. They have defined two JPEG-based file formats: * JFIF (JPEG File Interchange Format), a "low-end" format that transports pixels and not much else. * TIFF/JPEG, aka TIFF 6.0, an extension of the Aldus TIFF format. TIFF is a "high-end" format that will let you record just about everything you ever wanted to know about an image, and a lot more besides :-). TIFF is far more complex than JFIF, and is generally less transportable, because different vendors have often implemented slightly different and incompatible subsets of TIFF. It's not likely that adding JPEG to the mix will do anything to improve this situation. Both of these formats were developed with input from all the major vendors of JPEG-related products; it's reasonably likely that future commercial products will adhere to one or both standards. JFIF has emerged as the de-facto standard on Usenet. JFIF is simpler than TIFF and is available now; the TIFF 6.0 spec for incorporating JPEG is not widely implemented, partly because it has some serious design flaws. It is likely that the TIFF 6.0 JPEG section will be changed significantly before widespread adoption occurs. Even when TIFF/JPEG is well defined, the JFIF format is likely to be a widely supported "lowest common denominator"; TIFF/JPEG files may never be as transportable as JFIF. A particular case of wide interest is Apple's Macintosh QuickTime software. QuickTime uses a JFIF-compatible format wrapped inside the Mac-specific PICT structure. Conversion between JFIF and PICT/JPEG is pretty straightforward, and several Mac programs are available to do it (see Mac portion of part 2). If you have an editor that handles binary files, you can even strip a PICT/JPEG file down to JFIF by hand; see the next section for details. Another particular case is Handmade Software's DOS programs (GIF2JPG/JPG2GIF and Image Alchemy). These programs are capable of reading and writing JFIF format. By default, though, they write a proprietary format developed by HSI. This format is NOT readable by any non-HSI programs and should not be used for Usenet postings. Use the -j switch to get JFIF output. (This applies to old versions of these programs; the current releases emit JFIF format by default. You still should be careful not to post HSI-format files, unless you want to get flamed by people on non-PC platforms.) News flash: the ISO JPEG committee seems to have won their turf wars. They will define a complete file format spec called "SPIFF" in the next version of the JPEG standard. It's pretty late in the game though, so whether this will have much impact on real-world files remains to be seen. ------------------------------ Subject: [14] How do I recognize which file format I have, and what do I do about it? If you have an alleged JPEG file that your software won't read, it's likely to be HSI format or some other proprietary JPEG-based format. You can tell what you have by inspecting the first few bytes of the file: 1. A JFIF-standard file will start with the four bytes (hex) FF D8 FF E0, followed by two variable bytes (often hex 00 10), followed by 'JFIF'. 2. If you see FF D8 at the start, but not the 'JFIF' marker, you may have a "raw JPEG" file. This is probably decodable as-is by JFIF software --- it's worth a try, anyway. 3. HSI files start with 'hsi1'. You're out of luck unless you have HSI software. Portions of the file may look like plain JPEG data, but they usually won't decompress properly with non-HSI programs. 4. A Macintosh PICT file, if JPEG-compressed, will have several hundred bytes of header (often 726 bytes, but not always) followed by JPEG data. Look for the 3-byte sequence (hex) FF D8 FF. The text 'Photo - JPEG' will usually appear shortly before this header, and 'AppleMark' or 'JFIF' will usually appear shortly after it. Strip off everything before the FF D8 FF and you will usually be able to decode the file. (This will fail if the PICT image is divided into multiple "bands", but that is uncommon.) 5. If the file came from a Macintosh, it could also be a standard JFIF file with a MacBinary header attached. In this case, the JFIF header will appear 128 bytes into the file. Get rid of the first 128 bytes and you're set. 6. Anything else: it's a proprietary format, or not JPEG at all. If you are lucky, the file may consist of a header and a raw JPEG data stream. If you can identify the start of the JPEG data stream (look for FF D8), try stripping off everything before that. HSI files used to be rather common in alt.binaries.pictures.* postings, although thankfully they have gotten less so. You can spot an HSI posting by looking at the first few characters of the uuencoded data. The characteristic HSI pattern is "begin" line M:'-I ... whereas standard JFIF files begin with "begin" line M_]C_X ... If you learn to spot the HSI pattern, you can save yourself the trouble of downloading unusable files. At least one release of Hijaak Pro writes JFIF files that claim to be revision 2.01. There is no such spec; the latest JFIF revision is 1.02. It looks like HiJaak got the high and low bytes backwards. Unfortunately, most JFIF readers will give up on encountering these files, because the JFIF spec defines a major version number change to mean an incompatible format change. If there ever *were* a version 2.01, it would be so numbered because current software could not read it and should not try. (One wonders if Hijaak has ever heard of cross-testing with other people's software.) If you run into one of these misnumbered files, you can fix it with a binary-file editor, by changing the twelfth byte of the file from 2 to 1. ------------------------------ Subject: [15] How does JPEG work? You can find an introduction and references for further reading in the comp.compression FAQ, which is available from the news.answers archive at rtfm.mit.edu, in files /pub/usenet/news.answers/compression-faq/part[1-3] (see also "[20] Where are FAQ lists archived?"). The comp.compression FAQ is also a good starting point for information on other state-of-the-art image compression methods, such as wavelets and fractals. A quick comparison: wavelets are likely to be the basis of the next generation of image-compression standards, but they are perhaps 10 years behind JPEG in the standardization pipeline. Fractals have been terribly over-hyped by their chief commercial proponent, and it's difficult to say what their true capabilities are. ------------------------------ Subject: [16] What about arithmetic coding? The JPEG spec defines two different "back end" modules for the final output of compressed data: either Huffman coding or arithmetic coding is allowed. The choice has no impact on image quality, but arithmetic coding usually produces a smaller compressed file. On typical images, arithmetic coding produces a file 5 to 10 percent smaller than Huffman coding. (All the file-size numbers previously cited are for Huffman coding.) Unfortunately, the particular variant of arithmetic coding specified by the JPEG standard is subject to patents owned by IBM, AT&T, and Mitsubishi. Thus *you cannot legally use JPEG arithmetic coding* unless you obtain licenses from these companies. (Patent law's "experimental use" exception allows people to test a patented method in the context of scientific research, but any commercial or routine personal use is infringement.) I recommend that people not use JPEG arithmetic coding; the space savings isn't great enough to justify the potential legal hassles. In particular, arithmetic coding *should not* be used for any images to be exchanged on Usenet. Even if you don't care about US patent law, other folks do. ------------------------------ Subject: [17] Could an FPU speed up JPEG? How about a DSP chip? Since JPEG is so compute-intensive, many people suggest that using an FPU chip (a math coprocessor) should speed it up. This is not so. Most production-quality JPEG programs use only integer arithmetic and so they are unaffected by the presence or absence of floating-point hardware. It is possible to save a few operations by doing the DCT step in floating point. On most PC-class machines, FP math is enough slower than integer math that the overall speed is still much worse with FP. Some high-priced workstations and supercomputers have fast enough FP hardware to make an FP DCT method be a win. DSP (digital signal processing) chips are ideally suited for fast repetitive integer arithmetic, so programming a DSP to do JPEG can yield significant speedups. DSPs are starting to be found as add-ons for PCs and small workstations, so you can expect to see DSP-based JPEG programs popping up. ------------------------------ Subject: [18] Isn't there an M-JPEG standard for motion pictures? As was stated in section 1, JPEG is only for still images. Nonetheless, you will frequently see references to "motion JPEG" or "M-JPEG" for video. *There is no such standard*. Various vendors have applied JPEG to individual frames of a video sequence, and have called the result "M-JPEG". Unfortunately, in the absence of any recognized standard, they've each done it differently. The resulting files are usually not compatible across different vendors. MPEG is the recognized standard for motion picture compression. It uses many of the same techniques as JPEG, but adds inter-frame compression to exploit the similarities that usually exist between successive frames. Because of this, MPEG typically compresses a video sequence by about a factor of three more than "M-JPEG" methods can. The disadvantages of MPEG are (1) it requires much more computation to generate the compressed sequence (since detecting visual similarities is hard for a computer), and (2) it's difficult to edit an MPEG sequence on a frame-by-frame basis (since each frame is intimately tied to the ones around it). This latter problem has made "M-JPEG" methods rather popular for video editing products. It's a shame that there isn't a recognized M-JPEG standard. But there isn't, so if you buy a product identified as "M-JPEG", be aware that you are probably locking yourself into that one vendor. See the MPEG FAQ for more information about MPEG. ------------------------------ Subject: [19] What if I need more than 8-bit precision? Baseline JPEG stores images with 8 bits per color sample, in other words 24 bits per pixel for RGB images, 8 bits/pixel for grayscale, 32 bits/pixel for CMYK, etc. There is an extension that stores 12 bits/sample for applications that need higher accuracy. Medical images, for example, are often 12-bit grayscale. The 12-bit extension is not very widely supported, however. One package that does support it is the free IJG source code (see part 2 of this FAQ). For lossless JPEG, the standard permits any data precision between 2 and 16 bits per sample, but high-precision lossless JPEG is even less widely supported than high-precision lossy JPEG. I don't know of any working noncommercial implementations. (The Cornell lossless JPEG coder tries to support it, but reportedly has bugs with data of more than 8 bits.) ------------------------------ Subject: [20] Where are FAQ lists archived? Many FAQs are crossposted to news.answers. Well-run netnews sites will have the latest versions available in that newsgroup. However, there are a *lot* of postings in news.answers, and they can be hard to sort through. The latest versions of news.answers postings are archived at rtfm.mit.edu. You can retrieve this FAQ by FTP as /pub/usenet/news.answers/jpeg-faq/part1 and /pub/usenet/news.answers/jpeg-faq/part2. If you have no FTP access, send e-mail to mail-server@rtfm.mit.edu containing the lines send usenet/news.answers/jpeg-faq/part1 send usenet/news.answers/jpeg-faq/part2 (If you don't get a reply, the server may be misreading your return address; add a line such as "path myname@mysite" to specify your correct e-mail address to reply to.) For more info about the FAQ archive, retrieve the file rtfm.mit.edu:/pub/usenet/news.answers/news-answers/introduction. The same FAQs are also available in the World Wide Web; see the index at http://www.cis.ohio-state.edu/hypertext/faq/usenet/FAQ-List.html. This FAQ is http://www.cis.ohio-state.edu/hypertext/faq/usenet/jpeg-faq/top.html. Other WWW FAQ archives include http://www.cs.ruu.nl/cgi-bin/faqwais and http://www.lib.ox.ac.uk/internet/news/. -- tom lane organizer, Independent JPEG Group tgl@netcom.com or tgl@sss.pgh.pa.us
00000000 41 72 63 68 69 76 65 2d 6e 61 6d 65 3a 20 6a 70 |Archive-name: jp| 00000010 65 67 2d 66 61 71 2f 70 61 72 74 31 0a 50 6f 73 |eg-faq/part1.Pos| 00000020 74 69 6e 67 2d 46 72 65 71 75 65 6e 63 79 3a 20 |ting-Frequency: | 00000030 65 76 65 72 79 20 31 34 20 64 61 79 73 0a 4c 61 |every 14 days.La| 00000040 73 74 2d 6d 6f 64 69 66 69 65 64 3a 20 33 20 53 |st-modified: 3 S| 00000050 65 70 74 65 6d 62 65 72 20 31 39 39 35 0a 0a 54 |eptember 1995..T| 00000060 68 69 73 20 61 72 74 69 63 6c 65 20 61 6e 73 77 |his article answ| 00000070 65 72 73 20 46 72 65 71 75 65 6e 74 6c 79 20 41 |ers Frequently A| 00000080 73 6b 65 64 20 51 75 65 73 74 69 6f 6e 73 20 61 |sked Questions a| 00000090 62 6f 75 74 20 4a 50 45 47 20 69 6d 61 67 65 20 |bout JPEG image | 000000a0 63 6f 6d 70 72 65 73 73 69 6f 6e 2e 0a 54 68 69 |compression..Thi| 000000b0 73 20 69 73 20 70 61 72 74 20 31 2c 20 63 6f 76 |s is part 1, cov| 000000c0 65 72 69 6e 67 20 67 65 6e 65 72 61 6c 20 71 75 |ering general qu| 000000d0 65 73 74 69 6f 6e 73 20 61 6e 64 20 61 6e 73 77 |estions and answ| 000000e0 65 72 73 20 61 62 6f 75 74 20 4a 50 45 47 2e 20 |ers about JPEG. | 000000f0 20 50 61 72 74 20 32 0a 67 69 76 65 73 20 73 79 | Part 2.gives sy| 00000100 73 74 65 6d 2d 73 70 65 63 69 66 69 63 20 68 69 |stem-specific hi| 00000110 6e 74 73 20 61 6e 64 20 70 72 6f 67 72 61 6d 20 |nts and program | 00000120 72 65 63 6f 6d 6d 65 6e 64 61 74 69 6f 6e 73 2e |recommendations.| 00000130 20 20 41 73 20 61 6c 77 61 79 73 2c 0a 73 75 67 | As always,.sug| 00000140 67 65 73 74 69 6f 6e 73 20 66 6f 72 20 69 6d 70 |gestions for imp| 00000150 72 6f 76 65 6d 65 6e 74 20 6f 66 20 74 68 69 73 |rovement of this| 00000160 20 46 41 51 20 61 72 65 20 77 65 6c 63 6f 6d 65 | FAQ are welcome| 00000170 2e 0a 0a 4e 65 77 20 73 69 6e 63 65 20 76 65 72 |...New since ver| 00000180 73 69 6f 6e 20 6f 66 20 36 20 41 75 67 75 73 74 |sion of 6 August| 00000190 20 31 39 39 35 3a 0a 20 20 2a 20 55 70 64 61 74 | 1995:. * Updat| 000001a0 65 64 20 65 6e 74 72 79 20 6f 6e 20 70 72 6f 67 |ed entry on prog| 000001b0 72 65 73 73 69 76 65 20 4a 50 45 47 2e 0a 0a 0a |ressive JPEG....| 000001c0 54 68 69 73 20 61 72 74 69 63 6c 65 20 69 6e 63 |This article inc| 000001d0 6c 75 64 65 73 20 74 68 65 20 66 6f 6c 6c 6f 77 |ludes the follow| 000001e0 69 6e 67 20 73 65 63 74 69 6f 6e 73 3a 0a 0a 42 |ing sections:..B| 000001f0 61 73 69 63 20 71 75 65 73 74 69 6f 6e 73 3a 0a |asic questions:.| 00000200 0a 5b 31 5d 20 57 68 61 74 20 69 73 20 4a 50 45 |.[1] What is JPE| 00000210 47 3f 0a 5b 32 5d 20 57 68 79 20 75 73 65 20 4a |G?.[2] Why use J| 00000220 50 45 47 3f 0a 5b 33 5d 20 57 68 65 6e 20 73 68 |PEG?.[3] When sh| 00000230 6f 75 6c 64 20 49 20 75 73 65 20 4a 50 45 47 2c |ould I use JPEG,| 00000240 20 61 6e 64 20 77 68 65 6e 20 73 68 6f 75 6c 64 | and when should| 00000250 20 49 20 73 74 69 63 6b 20 77 69 74 68 20 47 49 | I stick with GI| 00000260 46 3f 0a 5b 34 5d 20 48 6f 77 20 77 65 6c 6c 20 |F?.[4] How well | 00000270 64 6f 65 73 20 4a 50 45 47 20 63 6f 6d 70 72 65 |does JPEG compre| 00000280 73 73 20 69 6d 61 67 65 73 3f 0a 5b 35 5d 20 57 |ss images?.[5] W| 00000290 68 61 74 20 61 72 65 20 67 6f 6f 64 20 22 71 75 |hat are good "qu| 000002a0 61 6c 69 74 79 22 20 73 65 74 74 69 6e 67 73 20 |ality" settings | 000002b0 66 6f 72 20 4a 50 45 47 3f 0a 5b 36 5d 20 57 68 |for JPEG?.[6] Wh| 000002c0 65 72 65 20 63 61 6e 20 49 20 67 65 74 20 4a 50 |ere can I get JP| 000002d0 45 47 20 73 6f 66 74 77 61 72 65 3f 0a 5b 37 5d |EG software?.[7]| 000002e0 20 48 6f 77 20 64 6f 20 49 20 76 69 65 77 20 4a | How do I view J| 000002f0 50 45 47 20 69 6d 61 67 65 73 20 70 6f 73 74 65 |PEG images poste| 00000300 64 20 6f 6e 20 55 73 65 6e 65 74 3f 0a 0a 4d 6f |d on Usenet?..Mo| 00000310 72 65 20 61 64 76 61 6e 63 65 64 20 71 75 65 73 |re advanced ques| 00000320 74 69 6f 6e 73 3a 0a 0a 5b 38 5d 20 57 68 61 74 |tions:..[8] What| 00000330 20 69 73 20 63 6f 6c 6f 72 20 71 75 61 6e 74 69 | is color quanti| 00000340 7a 61 74 69 6f 6e 3f 0a 5b 39 5d 20 57 68 61 74 |zation?.[9] What| 00000350 20 61 72 65 20 73 6f 6d 65 20 72 75 6c 65 73 20 | are some rules | 00000360 6f 66 20 74 68 75 6d 62 20 66 6f 72 20 63 6f 6e |of thumb for con| 00000370 76 65 72 74 69 6e 67 20 47 49 46 20 69 6d 61 67 |verting GIF imag| 00000380 65 73 20 74 6f 20 4a 50 45 47 3f 0a 5b 31 30 5d |es to JPEG?.[10]| 00000390 20 44 6f 65 73 20 6c 6f 73 73 20 61 63 63 75 6d | Does loss accum| 000003a0 75 6c 61 74 65 20 77 69 74 68 20 72 65 70 65 61 |ulate with repea| 000003b0 74 65 64 20 63 6f 6d 70 72 65 73 73 69 6f 6e 2f |ted compression/| 000003c0 64 65 63 6f 6d 70 72 65 73 73 69 6f 6e 3f 0a 5b |decompression?.[| 000003d0 31 31 5d 20 57 68 61 74 20 69 73 20 70 72 6f 67 |11] What is prog| 000003e0 72 65 73 73 69 76 65 20 4a 50 45 47 3f 0a 5b 31 |ressive JPEG?.[1| 000003f0 32 5d 20 49 73 6e 27 74 20 74 68 65 72 65 20 61 |2] Isn't there a| 00000400 20 6c 6f 73 73 6c 65 73 73 20 4a 50 45 47 3f 0a | lossless JPEG?.| 00000410 5b 31 33 5d 20 57 68 79 20 61 6c 6c 20 74 68 65 |[13] Why all the| 00000420 20 61 72 67 75 6d 65 6e 74 20 61 62 6f 75 74 20 | argument about | 00000430 66 69 6c 65 20 66 6f 72 6d 61 74 73 3f 0a 5b 31 |file formats?.[1| 00000440 34 5d 20 48 6f 77 20 64 6f 20 49 20 72 65 63 6f |4] How do I reco| 00000450 67 6e 69 7a 65 20 77 68 69 63 68 20 66 69 6c 65 |gnize which file| 00000460 20 66 6f 72 6d 61 74 20 49 20 68 61 76 65 2c 20 | format I have, | 00000470 61 6e 64 20 77 68 61 74 20 64 6f 20 49 20 64 6f |and what do I do| 00000480 20 61 62 6f 75 74 20 69 74 3f 0a 5b 31 35 5d 20 | about it?.[15] | 00000490 48 6f 77 20 64 6f 65 73 20 4a 50 45 47 20 77 6f |How does JPEG wo| 000004a0 72 6b 3f 0a 5b 31 36 5d 20 57 68 61 74 20 61 62 |rk?.[16] What ab| 000004b0 6f 75 74 20 61 72 69 74 68 6d 65 74 69 63 20 63 |out arithmetic c| 000004c0 6f 64 69 6e 67 3f 0a 5b 31 37 5d 20 43 6f 75 6c |oding?.[17] Coul| 000004d0 64 20 61 6e 20 46 50 55 20 73 70 65 65 64 20 75 |d an FPU speed u| 000004e0 70 20 4a 50 45 47 3f 20 20 48 6f 77 20 61 62 6f |p JPEG? How abo| 000004f0 75 74 20 61 20 44 53 50 20 63 68 69 70 3f 0a 5b |ut a DSP chip?.[| 00000500 31 38 5d 20 49 73 6e 27 74 20 74 68 65 72 65 20 |18] Isn't there | 00000510 61 6e 20 4d 2d 4a 50 45 47 20 73 74 61 6e 64 61 |an M-JPEG standa| 00000520 72 64 20 66 6f 72 20 6d 6f 74 69 6f 6e 20 70 69 |rd for motion pi| 00000530 63 74 75 72 65 73 3f 0a 5b 31 39 5d 20 57 68 61 |ctures?.[19] Wha| 00000540 74 20 69 66 20 49 20 6e 65 65 64 20 6d 6f 72 65 |t if I need more| 00000550 20 74 68 61 6e 20 38 2d 62 69 74 20 70 72 65 63 | than 8-bit prec| 00000560 69 73 69 6f 6e 3f 0a 0a 4d 69 73 63 65 6c 6c 61 |ision?..Miscella| 00000570 6e 65 6f 75 73 3a 0a 0a 5b 32 30 5d 20 57 68 65 |neous:..[20] Whe| 00000580 72 65 20 61 72 65 20 46 41 51 20 6c 69 73 74 73 |re are FAQ lists| 00000590 20 61 72 63 68 69 76 65 64 3f 0a 0a 0a 54 68 69 | archived?...Thi| 000005a0 73 20 61 72 74 69 63 6c 65 20 61 6e 64 20 69 74 |s article and it| 000005b0 73 20 63 6f 6d 70 61 6e 69 6f 6e 20 61 72 65 20 |s companion are | 000005c0 70 6f 73 74 65 64 20 65 76 65 72 79 20 32 20 77 |posted every 2 w| 000005d0 65 65 6b 73 2e 20 20 49 66 20 79 6f 75 20 63 61 |eeks. If you ca| 000005e0 6e 27 74 20 66 69 6e 64 0a 70 61 72 74 20 32 2c |n't find.part 2,| 000005f0 20 79 6f 75 20 63 61 6e 20 67 65 74 20 69 74 20 | you can get it | 00000600 66 72 6f 6d 20 74 68 65 20 6e 65 77 73 2e 61 6e |from the news.an| 00000610 73 77 65 72 73 20 61 72 63 68 69 76 65 20 61 74 |swers archive at| 00000620 20 72 74 66 6d 2e 6d 69 74 2e 65 64 75 0a 28 73 | rtfm.mit.edu.(s| 00000630 65 65 20 22 5b 32 30 5d 20 57 68 65 72 65 20 61 |ee "[20] Where a| 00000640 72 65 20 46 41 51 20 6c 69 73 74 73 20 61 72 63 |re FAQ lists arc| 00000650 68 69 76 65 64 3f 22 29 2e 20 20 50 61 72 74 20 |hived?"). Part | 00000660 32 20 63 68 61 6e 67 65 73 20 76 65 72 79 20 66 |2 changes very f| 00000670 72 65 71 75 65 6e 74 6c 79 3b 0a 67 65 74 20 61 |requently;.get a| 00000680 20 6e 65 77 20 63 6f 70 79 20 69 66 20 74 68 65 | new copy if the| 00000690 20 6f 6e 65 20 79 6f 75 20 61 72 65 20 72 65 61 | one you are rea| 000006a0 64 69 6e 67 20 69 73 20 6d 6f 72 65 20 74 68 61 |ding is more tha| 000006b0 6e 20 61 20 63 6f 75 70 6c 65 20 6d 6f 6e 74 68 |n a couple month| 000006c0 73 20 6f 6c 64 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d |s old...--------| 000006d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 000006e0 2d 2d 2d 2d 2d 2d 0a 0a 53 75 62 6a 65 63 74 3a |------..Subject:| 000006f0 20 5b 31 5d 20 57 68 61 74 20 69 73 20 4a 50 45 | [1] What is JPE| 00000700 47 3f 0a 0a 4a 50 45 47 20 28 70 72 6f 6e 6f 75 |G?..JPEG (pronou| 00000710 6e 63 65 64 20 22 6a 61 79 2d 70 65 67 22 29 20 |nced "jay-peg") | 00000720 69 73 20 61 20 73 74 61 6e 64 61 72 64 69 7a 65 |is a standardize| 00000730 64 20 69 6d 61 67 65 20 63 6f 6d 70 72 65 73 73 |d image compress| 00000740 69 6f 6e 20 6d 65 63 68 61 6e 69 73 6d 2e 0a 4a |ion mechanism..J| 00000750 50 45 47 20 73 74 61 6e 64 73 20 66 6f 72 20 4a |PEG stands for J| 00000760 6f 69 6e 74 20 50 68 6f 74 6f 67 72 61 70 68 69 |oint Photographi| 00000770 63 20 45 78 70 65 72 74 73 20 47 72 6f 75 70 2c |c Experts Group,| 00000780 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 6e 61 | the original na| 00000790 6d 65 20 6f 66 20 74 68 65 0a 63 6f 6d 6d 69 74 |me of the.commit| 000007a0 74 65 65 20 74 68 61 74 20 77 72 6f 74 65 20 74 |tee that wrote t| 000007b0 68 65 20 73 74 61 6e 64 61 72 64 2e 0a 0a 4a 50 |he standard...JP| 000007c0 45 47 20 69 73 20 64 65 73 69 67 6e 65 64 20 66 |EG is designed f| 000007d0 6f 72 20 63 6f 6d 70 72 65 73 73 69 6e 67 20 65 |or compressing e| 000007e0 69 74 68 65 72 20 66 75 6c 6c 2d 63 6f 6c 6f 72 |ither full-color| 000007f0 20 6f 72 20 67 72 61 79 2d 73 63 61 6c 65 20 69 | or gray-scale i| 00000800 6d 61 67 65 73 0a 6f 66 20 6e 61 74 75 72 61 6c |mages.of natural| 00000810 2c 20 72 65 61 6c 2d 77 6f 72 6c 64 20 73 63 65 |, real-world sce| 00000820 6e 65 73 2e 20 20 49 74 20 77 6f 72 6b 73 20 77 |nes. It works w| 00000830 65 6c 6c 20 6f 6e 20 70 68 6f 74 6f 67 72 61 70 |ell on photograp| 00000840 68 73 2c 20 6e 61 74 75 72 61 6c 69 73 74 69 63 |hs, naturalistic| 00000850 0a 61 72 74 77 6f 72 6b 2c 20 61 6e 64 20 73 69 |.artwork, and si| 00000860 6d 69 6c 61 72 20 6d 61 74 65 72 69 61 6c 3b 20 |milar material; | 00000870 6e 6f 74 20 73 6f 20 77 65 6c 6c 20 6f 6e 20 6c |not so well on l| 00000880 65 74 74 65 72 69 6e 67 2c 20 73 69 6d 70 6c 65 |ettering, simple| 00000890 20 63 61 72 74 6f 6f 6e 73 2c 0a 6f 72 20 6c 69 | cartoons,.or li| 000008a0 6e 65 20 64 72 61 77 69 6e 67 73 2e 20 20 4a 50 |ne drawings. JP| 000008b0 45 47 20 68 61 6e 64 6c 65 73 20 6f 6e 6c 79 20 |EG handles only | 000008c0 73 74 69 6c 6c 20 69 6d 61 67 65 73 2c 20 62 75 |still images, bu| 000008d0 74 20 74 68 65 72 65 20 69 73 20 61 20 72 65 6c |t there is a rel| 000008e0 61 74 65 64 0a 73 74 61 6e 64 61 72 64 20 63 61 |ated.standard ca| 000008f0 6c 6c 65 64 20 4d 50 45 47 20 66 6f 72 20 6d 6f |lled MPEG for mo| 00000900 74 69 6f 6e 20 70 69 63 74 75 72 65 73 2e 0a 0a |tion pictures...| 00000910 4a 50 45 47 20 69 73 20 22 6c 6f 73 73 79 2c 22 |JPEG is "lossy,"| 00000920 20 6d 65 61 6e 69 6e 67 20 74 68 61 74 20 74 68 | meaning that th| 00000930 65 20 64 65 63 6f 6d 70 72 65 73 73 65 64 20 69 |e decompressed i| 00000940 6d 61 67 65 20 69 73 6e 27 74 20 71 75 69 74 65 |mage isn't quite| 00000950 20 74 68 65 20 73 61 6d 65 20 61 73 0a 74 68 65 | the same as.the| 00000960 20 6f 6e 65 20 79 6f 75 20 73 74 61 72 74 65 64 | one you started| 00000970 20 77 69 74 68 2e 20 20 28 54 68 65 72 65 20 61 | with. (There a| 00000980 72 65 20 6c 6f 73 73 6c 65 73 73 20 69 6d 61 67 |re lossless imag| 00000990 65 20 63 6f 6d 70 72 65 73 73 69 6f 6e 20 61 6c |e compression al| 000009a0 67 6f 72 69 74 68 6d 73 2c 0a 62 75 74 20 4a 50 |gorithms,.but JP| 000009b0 45 47 20 61 63 68 69 65 76 65 73 20 6d 75 63 68 |EG achieves much| 000009c0 20 67 72 65 61 74 65 72 20 63 6f 6d 70 72 65 73 | greater compres| 000009d0 73 69 6f 6e 20 74 68 61 6e 20 69 73 20 70 6f 73 |sion than is pos| 000009e0 73 69 62 6c 65 20 77 69 74 68 20 6c 6f 73 73 6c |sible with lossl| 000009f0 65 73 73 0a 6d 65 74 68 6f 64 73 2e 29 20 20 4a |ess.methods.) J| 00000a00 50 45 47 20 69 73 20 64 65 73 69 67 6e 65 64 20 |PEG is designed | 00000a10 74 6f 20 65 78 70 6c 6f 69 74 20 6b 6e 6f 77 6e |to exploit known| 00000a20 20 6c 69 6d 69 74 61 74 69 6f 6e 73 20 6f 66 20 | limitations of | 00000a30 74 68 65 20 68 75 6d 61 6e 20 65 79 65 2c 0a 6e |the human eye,.n| 00000a40 6f 74 61 62 6c 79 20 74 68 65 20 66 61 63 74 20 |otably the fact | 00000a50 74 68 61 74 20 73 6d 61 6c 6c 20 63 6f 6c 6f 72 |that small color| 00000a60 20 63 68 61 6e 67 65 73 20 61 72 65 20 70 65 72 | changes are per| 00000a70 63 65 69 76 65 64 20 6c 65 73 73 20 61 63 63 75 |ceived less accu| 00000a80 72 61 74 65 6c 79 20 74 68 61 6e 0a 73 6d 61 6c |rately than.smal| 00000a90 6c 20 63 68 61 6e 67 65 73 20 69 6e 20 62 72 69 |l changes in bri| 00000aa0 67 68 74 6e 65 73 73 2e 20 20 54 68 75 73 2c 20 |ghtness. Thus, | 00000ab0 4a 50 45 47 20 69 73 20 69 6e 74 65 6e 64 65 64 |JPEG is intended| 00000ac0 20 66 6f 72 20 63 6f 6d 70 72 65 73 73 69 6e 67 | for compressing| 00000ad0 20 69 6d 61 67 65 73 0a 74 68 61 74 20 77 69 6c | images.that wil| 00000ae0 6c 20 62 65 20 6c 6f 6f 6b 65 64 20 61 74 20 62 |l be looked at b| 00000af0 79 20 68 75 6d 61 6e 73 2e 20 20 49 66 20 79 6f |y humans. If yo| 00000b00 75 20 70 6c 61 6e 20 74 6f 20 6d 61 63 68 69 6e |u plan to machin| 00000b10 65 2d 61 6e 61 6c 79 7a 65 20 79 6f 75 72 0a 69 |e-analyze your.i| 00000b20 6d 61 67 65 73 2c 20 74 68 65 20 73 6d 61 6c 6c |mages, the small| 00000b30 20 65 72 72 6f 72 73 20 69 6e 74 72 6f 64 75 63 | errors introduc| 00000b40 65 64 20 62 79 20 4a 50 45 47 20 6d 61 79 20 62 |ed by JPEG may b| 00000b50 65 20 61 20 70 72 6f 62 6c 65 6d 20 66 6f 72 20 |e a problem for | 00000b60 79 6f 75 2c 20 65 76 65 6e 0a 69 66 20 74 68 65 |you, even.if the| 00000b70 79 20 61 72 65 20 69 6e 76 69 73 69 62 6c 65 20 |y are invisible | 00000b80 74 6f 20 74 68 65 20 65 79 65 2e 0a 0a 41 20 75 |to the eye...A u| 00000b90 73 65 66 75 6c 20 70 72 6f 70 65 72 74 79 20 6f |seful property o| 00000ba0 66 20 4a 50 45 47 20 69 73 20 74 68 61 74 20 74 |f JPEG is that t| 00000bb0 68 65 20 64 65 67 72 65 65 20 6f 66 20 6c 6f 73 |he degree of los| 00000bc0 73 69 6e 65 73 73 20 63 61 6e 20 62 65 20 76 61 |siness can be va| 00000bd0 72 69 65 64 20 62 79 0a 61 64 6a 75 73 74 69 6e |ried by.adjustin| 00000be0 67 20 63 6f 6d 70 72 65 73 73 69 6f 6e 20 70 61 |g compression pa| 00000bf0 72 61 6d 65 74 65 72 73 2e 20 20 54 68 69 73 20 |rameters. This | 00000c00 6d 65 61 6e 73 20 74 68 61 74 20 74 68 65 20 69 |means that the i| 00000c10 6d 61 67 65 20 6d 61 6b 65 72 20 63 61 6e 20 74 |mage maker can t| 00000c20 72 61 64 65 0a 6f 66 66 20 66 69 6c 65 20 73 69 |rade.off file si| 00000c30 7a 65 20 61 67 61 69 6e 73 74 20 6f 75 74 70 75 |ze against outpu| 00000c40 74 20 69 6d 61 67 65 20 71 75 61 6c 69 74 79 2e |t image quality.| 00000c50 20 20 59 6f 75 20 63 61 6e 20 6d 61 6b 65 20 2a | You can make *| 00000c60 65 78 74 72 65 6d 65 6c 79 2a 20 73 6d 61 6c 6c |extremely* small| 00000c70 0a 66 69 6c 65 73 20 69 66 20 79 6f 75 20 64 6f |.files if you do| 00000c80 6e 27 74 20 6d 69 6e 64 20 70 6f 6f 72 20 71 75 |n't mind poor qu| 00000c90 61 6c 69 74 79 3b 20 74 68 69 73 20 69 73 20 75 |ality; this is u| 00000ca0 73 65 66 75 6c 20 66 6f 72 20 61 70 70 6c 69 63 |seful for applic| 00000cb0 61 74 69 6f 6e 73 20 73 75 63 68 0a 61 73 20 69 |ations such.as i| 00000cc0 6e 64 65 78 69 6e 67 20 69 6d 61 67 65 20 61 72 |ndexing image ar| 00000cd0 63 68 69 76 65 73 2e 20 20 43 6f 6e 76 65 72 73 |chives. Convers| 00000ce0 65 6c 79 2c 20 69 66 20 79 6f 75 20 61 72 65 6e |ely, if you aren| 00000cf0 27 74 20 68 61 70 70 79 20 77 69 74 68 20 74 68 |'t happy with th| 00000d00 65 20 6f 75 74 70 75 74 0a 71 75 61 6c 69 74 79 |e output.quality| 00000d10 20 61 74 20 74 68 65 20 64 65 66 61 75 6c 74 20 | at the default | 00000d20 63 6f 6d 70 72 65 73 73 69 6f 6e 20 73 65 74 74 |compression sett| 00000d30 69 6e 67 2c 20 79 6f 75 20 63 61 6e 20 6a 61 63 |ing, you can jac| 00000d40 6b 20 75 70 20 74 68 65 20 71 75 61 6c 69 74 79 |k up the quality| 00000d50 0a 75 6e 74 69 6c 20 79 6f 75 20 61 72 65 20 73 |.until you are s| 00000d60 61 74 69 73 66 69 65 64 2c 20 61 6e 64 20 61 63 |atisfied, and ac| 00000d70 63 65 70 74 20 6c 65 73 73 65 72 20 63 6f 6d 70 |cept lesser comp| 00000d80 72 65 73 73 69 6f 6e 2e 0a 0a 41 6e 6f 74 68 65 |ression...Anothe| 00000d90 72 20 69 6d 70 6f 72 74 61 6e 74 20 61 73 70 65 |r important aspe| 00000da0 63 74 20 6f 66 20 4a 50 45 47 20 69 73 20 74 68 |ct of JPEG is th| 00000db0 61 74 20 64 65 63 6f 64 65 72 73 20 63 61 6e 20 |at decoders can | 00000dc0 74 72 61 64 65 20 6f 66 66 20 64 65 63 6f 64 69 |trade off decodi| 00000dd0 6e 67 0a 73 70 65 65 64 20 61 67 61 69 6e 73 74 |ng.speed against| 00000de0 20 69 6d 61 67 65 20 71 75 61 6c 69 74 79 2c 20 | image quality, | 00000df0 62 79 20 75 73 69 6e 67 20 66 61 73 74 20 62 75 |by using fast bu| 00000e00 74 20 69 6e 61 63 63 75 72 61 74 65 20 61 70 70 |t inaccurate app| 00000e10 72 6f 78 69 6d 61 74 69 6f 6e 73 20 74 6f 0a 74 |roximations to.t| 00000e20 68 65 20 72 65 71 75 69 72 65 64 20 63 61 6c 63 |he required calc| 00000e30 75 6c 61 74 69 6f 6e 73 2e 20 20 53 6f 6d 65 20 |ulations. Some | 00000e40 76 69 65 77 65 72 73 20 6f 62 74 61 69 6e 20 72 |viewers obtain r| 00000e50 65 6d 61 72 6b 61 62 6c 65 20 73 70 65 65 64 75 |emarkable speedu| 00000e60 70 73 20 69 6e 20 74 68 69 73 0a 77 61 79 2e 0a |ps in this.way..| 00000e70 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |.---------------| 00000e80 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a |---------------.| 00000e90 0a 53 75 62 6a 65 63 74 3a 20 5b 32 5d 20 57 68 |.Subject: [2] Wh| 00000ea0 79 20 75 73 65 20 4a 50 45 47 3f 0a 0a 54 68 65 |y use JPEG?..The| 00000eb0 72 65 20 61 72 65 20 74 77 6f 20 67 6f 6f 64 20 |re are two good | 00000ec0 72 65 61 73 6f 6e 73 3a 20 74 6f 20 6d 61 6b 65 |reasons: to make| 00000ed0 20 79 6f 75 72 20 69 6d 61 67 65 20 66 69 6c 65 | your image file| 00000ee0 73 20 73 6d 61 6c 6c 65 72 2c 20 61 6e 64 20 74 |s smaller, and t| 00000ef0 6f 20 73 74 6f 72 65 0a 32 34 2d 62 69 74 2d 70 |o store.24-bit-p| 00000f00 65 72 2d 70 69 78 65 6c 20 63 6f 6c 6f 72 20 64 |er-pixel color d| 00000f10 61 74 61 20 69 6e 73 74 65 61 64 20 6f 66 20 38 |ata instead of 8| 00000f20 2d 62 69 74 2d 70 65 72 2d 70 69 78 65 6c 20 64 |-bit-per-pixel d| 00000f30 61 74 61 2e 0a 0a 4d 61 6b 69 6e 67 20 69 6d 61 |ata...Making ima| 00000f40 67 65 20 66 69 6c 65 73 20 73 6d 61 6c 6c 65 72 |ge files smaller| 00000f50 20 69 73 20 61 20 77 69 6e 20 66 6f 72 20 74 72 | is a win for tr| 00000f60 61 6e 73 6d 69 74 74 69 6e 67 20 66 69 6c 65 73 |ansmitting files| 00000f70 20 61 63 72 6f 73 73 20 6e 65 74 77 6f 72 6b 73 | across networks| 00000f80 0a 61 6e 64 20 66 6f 72 20 61 72 63 68 69 76 69 |.and for archivi| 00000f90 6e 67 20 6c 69 62 72 61 72 69 65 73 20 6f 66 20 |ng libraries of | 00000fa0 69 6d 61 67 65 73 2e 20 20 42 65 69 6e 67 20 61 |images. Being a| 00000fb0 62 6c 65 20 74 6f 20 63 6f 6d 70 72 65 73 73 20 |ble to compress | 00000fc0 61 20 32 20 4d 62 79 74 65 0a 66 75 6c 6c 2d 63 |a 2 Mbyte.full-c| 00000fd0 6f 6c 6f 72 20 66 69 6c 65 20 64 6f 77 6e 20 74 |olor file down t| 00000fe0 6f 2c 20 73 61 79 2c 20 31 30 30 20 4b 62 79 74 |o, say, 100 Kbyt| 00000ff0 65 73 20 6d 61 6b 65 73 20 61 20 62 69 67 20 64 |es makes a big d| 00001000 69 66 66 65 72 65 6e 63 65 20 69 6e 20 64 69 73 |ifference in dis| 00001010 6b 0a 73 70 61 63 65 20 61 6e 64 20 74 72 61 6e |k.space and tran| 00001020 73 6d 69 73 73 69 6f 6e 20 74 69 6d 65 21 20 20 |smission time! | 00001030 41 6e 64 20 4a 50 45 47 20 63 61 6e 20 65 61 73 |And JPEG can eas| 00001040 69 6c 79 20 70 72 6f 76 69 64 65 20 32 30 3a 31 |ily provide 20:1| 00001050 20 63 6f 6d 70 72 65 73 73 69 6f 6e 0a 6f 66 20 | compression.of | 00001060 66 75 6c 6c 2d 63 6f 6c 6f 72 20 64 61 74 61 2e |full-color data.| 00001070 20 20 49 66 20 79 6f 75 20 61 72 65 20 63 6f 6d | If you are com| 00001080 70 61 72 69 6e 67 20 47 49 46 20 61 6e 64 20 4a |paring GIF and J| 00001090 50 45 47 2c 20 74 68 65 20 73 69 7a 65 20 72 61 |PEG, the size ra| 000010a0 74 69 6f 20 69 73 0a 75 73 75 61 6c 6c 79 20 6d |tio is.usually m| 000010b0 6f 72 65 20 6c 69 6b 65 20 34 3a 31 20 28 73 65 |ore like 4:1 (se| 000010c0 65 20 22 5b 34 5d 20 48 6f 77 20 77 65 6c 6c 20 |e "[4] How well | 000010d0 64 6f 65 73 20 4a 50 45 47 20 63 6f 6d 70 72 65 |does JPEG compre| 000010e0 73 73 20 69 6d 61 67 65 73 3f 22 29 2e 0a 0a 49 |ss images?")...I| 000010f0 66 20 79 6f 75 72 20 76 69 65 77 69 6e 67 20 73 |f your viewing s| 00001100 6f 66 74 77 61 72 65 20 64 6f 65 73 6e 27 74 20 |oftware doesn't | 00001110 73 75 70 70 6f 72 74 20 4a 50 45 47 20 64 69 72 |support JPEG dir| 00001120 65 63 74 6c 79 2c 20 79 6f 75 27 6c 6c 20 68 61 |ectly, you'll ha| 00001130 76 65 20 74 6f 0a 63 6f 6e 76 65 72 74 20 4a 50 |ve to.convert JP| 00001140 45 47 20 74 6f 20 73 6f 6d 65 20 6f 74 68 65 72 |EG to some other| 00001150 20 66 6f 72 6d 61 74 20 74 6f 20 76 69 65 77 20 | format to view | 00001160 74 68 65 20 69 6d 61 67 65 2e 20 20 45 76 65 6e |the image. Even| 00001170 20 77 69 74 68 20 61 0a 4a 50 45 47 2d 63 61 70 | with a.JPEG-cap| 00001180 61 62 6c 65 20 76 69 65 77 65 72 2c 20 69 74 20 |able viewer, it | 00001190 74 61 6b 65 73 20 6c 6f 6e 67 65 72 20 74 6f 20 |takes longer to | 000011a0 64 65 63 6f 64 65 20 61 6e 64 20 76 69 65 77 20 |decode and view | 000011b0 61 20 4a 50 45 47 20 69 6d 61 67 65 20 74 68 61 |a JPEG image tha| 000011c0 6e 0a 74 6f 20 76 69 65 77 20 61 6e 20 69 6d 61 |n.to view an ima| 000011d0 67 65 20 6f 66 20 61 20 73 69 6d 70 6c 65 72 20 |ge of a simpler | 000011e0 66 6f 72 6d 61 74 20 73 75 63 68 20 61 73 20 47 |format such as G| 000011f0 49 46 2e 20 20 54 68 75 73 2c 20 75 73 69 6e 67 |IF. Thus, using| 00001200 20 4a 50 45 47 20 69 73 0a 65 73 73 65 6e 74 69 | JPEG is.essenti| 00001210 61 6c 6c 79 20 61 20 74 69 6d 65 2f 73 70 61 63 |ally a time/spac| 00001220 65 20 74 72 61 64 65 6f 66 66 3a 20 79 6f 75 20 |e tradeoff: you | 00001230 67 69 76 65 20 75 70 20 73 6f 6d 65 20 74 69 6d |give up some tim| 00001240 65 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 73 74 |e in order to st| 00001250 6f 72 65 0a 6f 72 20 74 72 61 6e 73 6d 69 74 20 |ore.or transmit | 00001260 61 6e 20 69 6d 61 67 65 20 6d 6f 72 65 20 63 68 |an image more ch| 00001270 65 61 70 6c 79 2e 20 20 42 75 74 20 69 74 27 73 |eaply. But it's| 00001280 20 77 6f 72 74 68 20 6e 6f 74 69 6e 67 20 74 68 | worth noting th| 00001290 61 74 20 77 68 65 6e 20 6e 65 74 77 6f 72 6b 0a |at when network.| 000012a0 6f 72 20 74 65 6c 65 70 68 6f 6e 65 20 74 72 61 |or telephone tra| 000012b0 6e 73 6d 69 73 73 69 6f 6e 20 69 73 20 69 6e 76 |nsmission is inv| 000012c0 6f 6c 76 65 64 2c 20 74 68 65 20 74 69 6d 65 20 |olved, the time | 000012d0 73 61 76 69 6e 67 73 20 66 72 6f 6d 20 74 72 61 |savings from tra| 000012e0 6e 73 66 65 72 72 69 6e 67 20 61 0a 73 68 6f 72 |nsferring a.shor| 000012f0 74 65 72 20 66 69 6c 65 20 63 61 6e 20 62 65 20 |ter file can be | 00001300 67 72 65 61 74 65 72 20 74 68 61 6e 20 74 68 65 |greater than the| 00001310 20 74 69 6d 65 20 6e 65 65 64 65 64 20 74 6f 20 | time needed to | 00001320 64 65 63 6f 6d 70 72 65 73 73 20 74 68 65 20 66 |decompress the f| 00001330 69 6c 65 2e 0a 0a 54 68 65 20 73 65 63 6f 6e 64 |ile...The second| 00001340 20 66 75 6e 64 61 6d 65 6e 74 61 6c 20 61 64 76 | fundamental adv| 00001350 61 6e 74 61 67 65 20 6f 66 20 4a 50 45 47 20 69 |antage of JPEG i| 00001360 73 20 74 68 61 74 20 69 74 20 73 74 6f 72 65 73 |s that it stores| 00001370 20 66 75 6c 6c 20 63 6f 6c 6f 72 0a 69 6e 66 6f | full color.info| 00001380 72 6d 61 74 69 6f 6e 3a 20 32 34 20 62 69 74 73 |rmation: 24 bits| 00001390 2f 70 69 78 65 6c 20 28 31 36 20 6d 69 6c 6c 69 |/pixel (16 milli| 000013a0 6f 6e 20 63 6f 6c 6f 72 73 29 2e 20 20 47 49 46 |on colors). GIF| 000013b0 2c 20 74 68 65 20 6f 74 68 65 72 20 69 6d 61 67 |, the other imag| 000013c0 65 20 66 6f 72 6d 61 74 0a 77 69 64 65 6c 79 20 |e format.widely | 000013d0 75 73 65 64 20 6f 6e 20 55 73 65 6e 65 74 2c 20 |used on Usenet, | 000013e0 63 61 6e 20 6f 6e 6c 79 20 73 74 6f 72 65 20 38 |can only store 8| 000013f0 20 62 69 74 73 2f 70 69 78 65 6c 20 28 32 35 36 | bits/pixel (256| 00001400 20 6f 72 20 66 65 77 65 72 20 63 6f 6c 6f 72 73 | or fewer colors| 00001410 29 2e 0a 47 49 46 20 69 73 20 72 65 61 73 6f 6e |)..GIF is reason| 00001420 61 62 6c 79 20 77 65 6c 6c 20 6d 61 74 63 68 65 |ably well matche| 00001430 64 20 74 6f 20 69 6e 65 78 70 65 6e 73 69 76 65 |d to inexpensive| 00001440 20 63 6f 6d 70 75 74 65 72 20 64 69 73 70 6c 61 | computer displa| 00001450 79 73 20 2d 2d 2d 20 6d 6f 73 74 0a 72 75 6e 2d |ys --- most.run-| 00001460 6f 66 2d 74 68 65 2d 6d 69 6c 6c 20 50 43 73 20 |of-the-mill PCs | 00001470 63 61 6e 27 74 20 64 69 73 70 6c 61 79 20 6d 6f |can't display mo| 00001480 72 65 20 74 68 61 6e 20 32 35 36 20 64 69 73 74 |re than 256 dist| 00001490 69 6e 63 74 20 63 6f 6c 6f 72 73 20 61 74 20 6f |inct colors at o| 000014a0 6e 63 65 2e 0a 42 75 74 20 66 75 6c 6c 2d 63 6f |nce..But full-co| 000014b0 6c 6f 72 20 68 61 72 64 77 61 72 65 20 69 73 20 |lor hardware is | 000014c0 67 65 74 74 69 6e 67 20 63 68 65 61 70 65 72 20 |getting cheaper | 000014d0 61 6c 6c 20 74 68 65 20 74 69 6d 65 2c 20 61 6e |all the time, an| 000014e0 64 20 4a 50 45 47 20 69 6d 61 67 65 73 0a 6c 6f |d JPEG images.lo| 000014f0 6f 6b 20 2a 6d 75 63 68 2a 20 62 65 74 74 65 72 |ok *much* better| 00001500 20 74 68 61 6e 20 47 49 46 73 20 6f 6e 20 73 75 | than GIFs on su| 00001510 63 68 20 68 61 72 64 77 61 72 65 2e 20 20 57 69 |ch hardware. Wi| 00001520 74 68 69 6e 20 61 20 63 6f 75 70 6c 65 20 6f 66 |thin a couple of| 00001530 20 79 65 61 72 73 2c 0a 47 49 46 20 77 69 6c 6c | years,.GIF will| 00001540 20 70 72 6f 62 61 62 6c 79 20 73 65 65 6d 20 61 | probably seem a| 00001550 73 20 6f 62 73 6f 6c 65 74 65 20 61 73 20 62 6c |s obsolete as bl| 00001560 61 63 6b 2d 61 6e 64 2d 77 68 69 74 65 20 4d 61 |ack-and-white Ma| 00001570 63 50 61 69 6e 74 20 66 6f 72 6d 61 74 20 64 6f |cPaint format do| 00001580 65 73 0a 74 6f 64 61 79 2e 20 20 46 75 72 74 68 |es.today. Furth| 00001590 65 72 6d 6f 72 65 2c 20 4a 50 45 47 20 69 73 20 |ermore, JPEG is | 000015a0 66 61 72 20 6d 6f 72 65 20 75 73 65 66 75 6c 20 |far more useful | 000015b0 74 68 61 6e 20 47 49 46 20 66 6f 72 20 65 78 63 |than GIF for exc| 000015c0 68 61 6e 67 69 6e 67 20 69 6d 61 67 65 73 0a 61 |hanging images.a| 000015d0 6d 6f 6e 67 20 70 65 6f 70 6c 65 20 77 69 74 68 |mong people with| 000015e0 20 77 69 64 65 6c 79 20 76 61 72 79 69 6e 67 20 | widely varying | 000015f0 64 69 73 70 6c 61 79 20 68 61 72 64 77 61 72 65 |display hardware| 00001600 2c 20 62 65 63 61 75 73 65 20 69 74 20 61 76 6f |, because it avo| 00001610 69 64 73 0a 70 72 65 6a 75 64 67 69 6e 67 20 68 |ids.prejudging h| 00001620 6f 77 20 6d 61 6e 79 20 63 6f 6c 6f 72 73 20 74 |ow many colors t| 00001630 6f 20 75 73 65 20 28 73 65 65 20 22 5b 38 5d 20 |o use (see "[8] | 00001640 57 68 61 74 20 69 73 20 63 6f 6c 6f 72 20 71 75 |What is color qu| 00001650 61 6e 74 69 7a 61 74 69 6f 6e 3f 22 29 2e 0a 48 |antization?")..H| 00001660 65 6e 63 65 20 4a 50 45 47 20 69 73 20 63 6f 6e |ence JPEG is con| 00001670 73 69 64 65 72 61 62 6c 79 20 6d 6f 72 65 20 61 |siderably more a| 00001680 70 70 72 6f 70 72 69 61 74 65 20 74 68 61 6e 20 |ppropriate than | 00001690 47 49 46 20 66 6f 72 20 75 73 65 20 61 73 20 61 |GIF for use as a| 000016a0 20 55 73 65 6e 65 74 0a 70 6f 73 74 69 6e 67 20 | Usenet.posting | 000016b0 73 74 61 6e 64 61 72 64 2e 0a 0a 41 20 6c 6f 74 |standard...A lot| 000016c0 20 6f 66 20 70 65 6f 70 6c 65 20 61 72 65 20 73 | of people are s| 000016d0 63 61 72 65 64 20 6f 66 66 20 62 79 20 74 68 65 |cared off by the| 000016e0 20 74 65 72 6d 20 22 6c 6f 73 73 79 20 63 6f 6d | term "lossy com| 000016f0 70 72 65 73 73 69 6f 6e 22 2e 20 20 42 75 74 20 |pression". But | 00001700 77 68 65 6e 0a 69 74 20 63 6f 6d 65 73 20 74 6f |when.it comes to| 00001710 20 72 65 70 72 65 73 65 6e 74 69 6e 67 20 72 65 | representing re| 00001720 61 6c 2d 77 6f 72 6c 64 20 73 63 65 6e 65 73 2c |al-world scenes,| 00001730 20 2a 6e 6f 2a 20 64 69 67 69 74 61 6c 20 69 6d | *no* digital im| 00001740 61 67 65 20 66 6f 72 6d 61 74 20 63 61 6e 0a 72 |age format can.r| 00001750 65 74 61 69 6e 20 61 6c 6c 20 74 68 65 20 69 6e |etain all the in| 00001760 66 6f 72 6d 61 74 69 6f 6e 20 74 68 61 74 20 69 |formation that i| 00001770 6d 70 69 6e 67 65 73 20 6f 6e 20 79 6f 75 72 20 |mpinges on your | 00001780 65 79 65 62 61 6c 6c 2e 20 20 42 79 20 63 6f 6d |eyeball. By com| 00001790 70 61 72 69 73 6f 6e 0a 77 69 74 68 20 74 68 65 |parison.with the| 000017a0 20 72 65 61 6c 2d 77 6f 72 6c 64 20 73 63 65 6e | real-world scen| 000017b0 65 2c 20 4a 50 45 47 20 6c 6f 73 65 73 20 66 61 |e, JPEG loses fa| 000017c0 72 20 6c 65 73 73 20 69 6e 66 6f 72 6d 61 74 69 |r less informati| 000017d0 6f 6e 20 74 68 61 6e 20 47 49 46 2e 0a 54 68 65 |on than GIF..The| 000017e0 20 72 65 61 6c 20 64 69 73 61 64 76 61 6e 74 61 | real disadvanta| 000017f0 67 65 20 6f 66 20 6c 6f 73 73 79 20 63 6f 6d 70 |ge of lossy comp| 00001800 72 65 73 73 69 6f 6e 20 69 73 20 74 68 61 74 20 |ression is that | 00001810 69 66 20 79 6f 75 20 72 65 70 65 61 74 65 64 6c |if you repeatedl| 00001820 79 0a 63 6f 6d 70 72 65 73 73 20 61 6e 64 20 64 |y.compress and d| 00001830 65 63 6f 6d 70 72 65 73 73 20 61 6e 20 69 6d 61 |ecompress an ima| 00001840 67 65 2c 20 79 6f 75 20 6c 6f 73 65 20 61 20 6c |ge, you lose a l| 00001850 69 74 74 6c 65 20 71 75 61 6c 69 74 79 20 65 61 |ittle quality ea| 00001860 63 68 20 74 69 6d 65 0a 28 73 65 65 20 22 5b 31 |ch time.(see "[1| 00001870 30 5d 20 44 6f 65 73 20 6c 6f 73 73 20 61 63 63 |0] Does loss acc| 00001880 75 6d 75 6c 61 74 65 20 77 69 74 68 20 72 65 70 |umulate with rep| 00001890 65 61 74 65 64 20 63 6f 6d 70 72 65 73 73 69 6f |eated compressio| 000018a0 6e 2f 64 65 63 6f 6d 70 72 65 73 73 69 6f 6e 3f |n/decompression?| 000018b0 22 29 2e 0a 54 68 69 73 20 69 73 20 61 20 73 65 |")..This is a se| 000018c0 72 69 6f 75 73 20 6f 62 6a 65 63 74 69 6f 6e 20 |rious objection | 000018d0 66 6f 72 20 73 6f 6d 65 20 61 70 70 6c 69 63 61 |for some applica| 000018e0 74 69 6f 6e 73 20 62 75 74 20 6d 61 74 74 65 72 |tions but matter| 000018f0 73 20 6e 6f 74 20 61 74 20 61 6c 6c 0a 66 6f 72 |s not at all.for| 00001900 20 6d 61 6e 79 20 6f 74 68 65 72 73 2e 0a 0a 2d | many others...-| 00001910 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00001920 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 53 |-------------..S| 00001930 75 62 6a 65 63 74 3a 20 5b 33 5d 20 57 68 65 6e |ubject: [3] When| 00001940 20 73 68 6f 75 6c 64 20 49 20 75 73 65 20 4a 50 | should I use JP| 00001950 45 47 2c 20 61 6e 64 20 77 68 65 6e 20 73 68 6f |EG, and when sho| 00001960 75 6c 64 20 49 20 73 74 69 63 6b 20 77 69 74 68 |uld I stick with| 00001970 20 47 49 46 3f 0a 0a 4a 50 45 47 20 69 73 20 2a | GIF?..JPEG is *| 00001980 6e 6f 74 2a 20 67 6f 69 6e 67 20 74 6f 20 64 69 |not* going to di| 00001990 73 70 6c 61 63 65 20 47 49 46 20 65 6e 74 69 72 |splace GIF entir| 000019a0 65 6c 79 3b 20 66 6f 72 20 73 6f 6d 65 20 74 79 |ely; for some ty| 000019b0 70 65 73 20 6f 66 20 69 6d 61 67 65 73 2c 0a 47 |pes of images,.G| 000019c0 49 46 20 69 73 20 73 75 70 65 72 69 6f 72 20 69 |IF is superior i| 000019d0 6e 20 69 6d 61 67 65 20 71 75 61 6c 69 74 79 2c |n image quality,| 000019e0 20 66 69 6c 65 20 73 69 7a 65 2c 20 6f 72 20 62 | file size, or b| 000019f0 6f 74 68 2e 20 20 4f 6e 65 20 6f 66 20 74 68 65 |oth. One of the| 00001a00 20 66 69 72 73 74 0a 74 68 69 6e 67 73 20 74 6f | first.things to| 00001a10 20 6c 65 61 72 6e 20 61 62 6f 75 74 20 4a 50 45 | learn about JPE| 00001a20 47 20 69 73 20 77 68 69 63 68 20 6b 69 6e 64 73 |G is which kinds| 00001a30 20 6f 66 20 69 6d 61 67 65 73 20 74 6f 20 61 70 | of images to ap| 00001a40 70 6c 79 20 69 74 20 74 6f 2e 0a 0a 47 65 6e 65 |ply it to...Gene| 00001a50 72 61 6c 6c 79 20 73 70 65 61 6b 69 6e 67 2c 20 |rally speaking, | 00001a60 4a 50 45 47 20 69 73 20 73 75 70 65 72 69 6f 72 |JPEG is superior| 00001a70 20 74 6f 20 47 49 46 20 66 6f 72 20 73 74 6f 72 | to GIF for stor| 00001a80 69 6e 67 20 66 75 6c 6c 2d 63 6f 6c 6f 72 20 6f |ing full-color o| 00001a90 72 0a 67 72 61 79 2d 73 63 61 6c 65 20 69 6d 61 |r.gray-scale ima| 00001aa0 67 65 73 20 6f 66 20 22 72 65 61 6c 69 73 74 69 |ges of "realisti| 00001ab0 63 22 20 73 63 65 6e 65 73 3b 20 74 68 61 74 20 |c" scenes; that | 00001ac0 6d 65 61 6e 73 20 73 63 61 6e 6e 65 64 20 70 68 |means scanned ph| 00001ad0 6f 74 6f 67 72 61 70 68 73 20 61 6e 64 0a 73 69 |otographs and.si| 00001ae0 6d 69 6c 61 72 20 6d 61 74 65 72 69 61 6c 2e 20 |milar material. | 00001af0 20 41 6e 79 20 63 6f 6e 74 69 6e 75 6f 75 73 20 | Any continuous | 00001b00 76 61 72 69 61 74 69 6f 6e 20 69 6e 20 63 6f 6c |variation in col| 00001b10 6f 72 2c 20 73 75 63 68 20 61 73 20 6f 63 63 75 |or, such as occu| 00001b20 72 73 20 69 6e 0a 68 69 67 68 6c 69 67 68 74 65 |rs in.highlighte| 00001b30 64 20 6f 72 20 73 68 61 64 65 64 20 61 72 65 61 |d or shaded area| 00001b40 73 2c 20 77 69 6c 6c 20 62 65 20 72 65 70 72 65 |s, will be repre| 00001b50 73 65 6e 74 65 64 20 6d 6f 72 65 20 66 61 69 74 |sented more fait| 00001b60 68 66 75 6c 6c 79 20 61 6e 64 20 69 6e 20 6c 65 |hfully and in le| 00001b70 73 73 0a 73 70 61 63 65 20 62 79 20 4a 50 45 47 |ss.space by JPEG| 00001b80 20 74 68 61 6e 20 62 79 20 47 49 46 2e 0a 0a 47 | than by GIF...G| 00001b90 49 46 20 64 6f 65 73 20 73 69 67 6e 69 66 69 63 |IF does signific| 00001ba0 61 6e 74 6c 79 20 62 65 74 74 65 72 20 6f 6e 20 |antly better on | 00001bb0 69 6d 61 67 65 73 20 77 69 74 68 20 6f 6e 6c 79 |images with only| 00001bc0 20 61 20 66 65 77 20 64 69 73 74 69 6e 63 74 20 | a few distinct | 00001bd0 63 6f 6c 6f 72 73 2c 0a 73 75 63 68 20 61 73 20 |colors,.such as | 00001be0 6c 69 6e 65 20 64 72 61 77 69 6e 67 73 20 61 6e |line drawings an| 00001bf0 64 20 73 69 6d 70 6c 65 20 63 61 72 74 6f 6f 6e |d simple cartoon| 00001c00 73 2e 20 20 4e 6f 74 20 6f 6e 6c 79 20 69 73 20 |s. Not only is | 00001c10 47 49 46 20 6c 6f 73 73 6c 65 73 73 20 66 6f 72 |GIF lossless for| 00001c20 0a 73 75 63 68 20 69 6d 61 67 65 73 2c 20 62 75 |.such images, bu| 00001c30 74 20 69 74 20 6f 66 74 65 6e 20 63 6f 6d 70 72 |t it often compr| 00001c40 65 73 73 65 73 20 74 68 65 6d 20 6d 6f 72 65 20 |esses them more | 00001c50 74 68 61 6e 20 4a 50 45 47 20 63 61 6e 2e 20 20 |than JPEG can. | 00001c60 46 6f 72 20 65 78 61 6d 70 6c 65 2c 0a 6c 61 72 |For example,.lar| 00001c70 67 65 20 61 72 65 61 73 20 6f 66 20 70 69 78 65 |ge areas of pixe| 00001c80 6c 73 20 74 68 61 74 20 61 72 65 20 61 6c 6c 20 |ls that are all | 00001c90 2a 65 78 61 63 74 6c 79 2a 20 74 68 65 20 73 61 |*exactly* the sa| 00001ca0 6d 65 20 63 6f 6c 6f 72 20 61 72 65 20 63 6f 6d |me color are com| 00001cb0 70 72 65 73 73 65 64 0a 76 65 72 79 20 65 66 66 |pressed.very eff| 00001cc0 69 63 69 65 6e 74 6c 79 20 69 6e 64 65 65 64 20 |iciently indeed | 00001cd0 62 79 20 47 49 46 2e 20 20 4a 50 45 47 20 63 61 |by GIF. JPEG ca| 00001ce0 6e 27 74 20 73 71 75 65 65 7a 65 20 73 75 63 68 |n't squeeze such| 00001cf0 20 64 61 74 61 20 61 73 20 6d 75 63 68 20 61 73 | data as much as| 00001d00 20 47 49 46 0a 64 6f 65 73 20 77 69 74 68 6f 75 | GIF.does withou| 00001d10 74 20 69 6e 74 72 6f 64 75 63 69 6e 67 20 76 69 |t introducing vi| 00001d20 73 69 62 6c 65 20 64 65 66 65 63 74 73 2e 20 20 |sible defects. | 00001d30 28 4f 6e 65 20 69 6d 70 6c 69 63 61 74 69 6f 6e |(One implication| 00001d40 20 6f 66 20 74 68 69 73 20 69 73 20 74 68 61 74 | of this is that| 00001d50 0a 6c 61 72 67 65 20 73 69 6e 67 6c 65 2d 63 6f |.large single-co| 00001d60 6c 6f 72 20 62 6f 72 64 65 72 73 20 61 72 65 20 |lor borders are | 00001d70 71 75 69 74 65 20 63 68 65 61 70 20 69 6e 20 47 |quite cheap in G| 00001d80 49 46 20 66 69 6c 65 73 2c 20 77 68 69 6c 65 20 |IF files, while | 00001d90 74 68 65 79 20 61 72 65 20 62 65 73 74 0a 61 76 |they are best.av| 00001da0 6f 69 64 65 64 20 69 6e 20 4a 50 45 47 20 66 69 |oided in JPEG fi| 00001db0 6c 65 73 2e 29 0a 0a 43 6f 6d 70 75 74 65 72 2d |les.)..Computer-| 00001dc0 64 72 61 77 6e 20 69 6d 61 67 65 73 2c 20 73 75 |drawn images, su| 00001dd0 63 68 20 61 73 20 72 61 79 2d 74 72 61 63 65 64 |ch as ray-traced| 00001de0 20 73 63 65 6e 65 73 2c 20 75 73 75 61 6c 6c 79 | scenes, usually| 00001df0 20 66 61 6c 6c 20 62 65 74 77 65 65 6e 0a 70 68 | fall between.ph| 00001e00 6f 74 6f 67 72 61 70 68 73 20 61 6e 64 20 63 61 |otographs and ca| 00001e10 72 74 6f 6f 6e 73 20 69 6e 20 74 65 72 6d 73 20 |rtoons in terms | 00001e20 6f 66 20 63 6f 6d 70 6c 65 78 69 74 79 2e 20 20 |of complexity. | 00001e30 54 68 65 20 6d 6f 72 65 20 63 6f 6d 70 6c 65 78 |The more complex| 00001e40 20 61 6e 64 0a 73 75 62 74 6c 79 20 72 65 6e 64 | and.subtly rend| 00001e50 65 72 65 64 20 74 68 65 20 69 6d 61 67 65 2c 20 |ered the image, | 00001e60 74 68 65 20 6d 6f 72 65 20 6c 69 6b 65 6c 79 20 |the more likely | 00001e70 74 68 61 74 20 4a 50 45 47 20 77 69 6c 6c 20 64 |that JPEG will d| 00001e80 6f 20 77 65 6c 6c 20 6f 6e 20 69 74 2e 0a 54 68 |o well on it..Th| 00001e90 65 20 73 61 6d 65 20 67 6f 65 73 20 66 6f 72 20 |e same goes for | 00001ea0 73 65 6d 69 2d 72 65 61 6c 69 73 74 69 63 20 61 |semi-realistic a| 00001eb0 72 74 77 6f 72 6b 20 28 66 61 6e 74 61 73 79 20 |rtwork (fantasy | 00001ec0 64 72 61 77 69 6e 67 73 20 61 6e 64 20 73 75 63 |drawings and suc| 00001ed0 68 29 2e 0a 42 75 74 20 69 63 6f 6e 73 20 74 68 |h)..But icons th| 00001ee0 61 74 20 75 73 65 20 6f 6e 6c 79 20 61 20 66 65 |at use only a fe| 00001ef0 77 20 63 6f 6c 6f 72 73 20 61 72 65 20 68 61 6e |w colors are han| 00001f00 64 6c 65 64 20 62 65 74 74 65 72 20 62 79 20 47 |dled better by G| 00001f10 49 46 2e 0a 0a 4a 50 45 47 20 68 61 73 20 61 20 |IF...JPEG has a | 00001f20 68 61 72 64 20 74 69 6d 65 20 77 69 74 68 20 76 |hard time with v| 00001f30 65 72 79 20 73 68 61 72 70 20 65 64 67 65 73 3a |ery sharp edges:| 00001f40 20 61 20 72 6f 77 20 6f 66 20 70 75 72 65 2d 62 | a row of pure-b| 00001f50 6c 61 63 6b 20 70 69 78 65 6c 73 0a 61 64 6a 61 |lack pixels.adja| 00001f60 63 65 6e 74 20 74 6f 20 61 20 72 6f 77 20 6f 66 |cent to a row of| 00001f70 20 70 75 72 65 2d 77 68 69 74 65 20 70 69 78 65 | pure-white pixe| 00001f80 6c 73 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2e |ls, for example.| 00001f90 20 20 53 68 61 72 70 20 65 64 67 65 73 20 74 65 | Sharp edges te| 00001fa0 6e 64 20 74 6f 0a 63 6f 6d 65 20 6f 75 74 20 62 |nd to.come out b| 00001fb0 6c 75 72 72 65 64 20 75 6e 6c 65 73 73 20 79 6f |lurred unless yo| 00001fc0 75 20 75 73 65 20 61 20 76 65 72 79 20 68 69 67 |u use a very hig| 00001fd0 68 20 71 75 61 6c 69 74 79 20 73 65 74 74 69 6e |h quality settin| 00001fe0 67 2e 20 20 45 64 67 65 73 20 74 68 69 73 0a 73 |g. Edges this.s| 00001ff0 68 61 72 70 20 61 72 65 20 72 61 72 65 20 69 6e |harp are rare in| 00002000 20 73 63 61 6e 6e 65 64 20 70 68 6f 74 6f 67 72 | scanned photogr| 00002010 61 70 68 73 2c 20 62 75 74 20 61 72 65 20 66 61 |aphs, but are fa| 00002020 69 72 6c 79 20 63 6f 6d 6d 6f 6e 20 69 6e 20 47 |irly common in G| 00002030 49 46 20 66 69 6c 65 73 3a 0a 63 6f 6e 73 69 64 |IF files:.consid| 00002040 65 72 20 62 6f 72 64 65 72 73 2c 20 6f 76 65 72 |er borders, over| 00002050 6c 61 69 64 20 74 65 78 74 2c 20 65 74 63 2e 20 |laid text, etc. | 00002060 20 54 68 65 20 62 6c 75 72 72 69 6e 65 73 73 20 | The blurriness | 00002070 69 73 20 70 61 72 74 69 63 75 6c 61 72 6c 79 0a |is particularly.| 00002080 6f 62 6a 65 63 74 69 6f 6e 61 62 6c 65 20 77 69 |objectionable wi| 00002090 74 68 20 74 65 78 74 20 74 68 61 74 27 73 20 6f |th text that's o| 000020a0 6e 6c 79 20 61 20 66 65 77 20 70 69 78 65 6c 73 |nly a few pixels| 000020b0 20 68 69 67 68 2e 20 20 49 66 20 79 6f 75 20 68 | high. If you h| 000020c0 61 76 65 20 61 20 47 49 46 0a 77 69 74 68 20 61 |ave a GIF.with a| 000020d0 20 6c 6f 74 20 6f 66 20 73 6d 61 6c 6c 2d 73 69 | lot of small-si| 000020e0 7a 65 20 6f 76 65 72 6c 61 69 64 20 74 65 78 74 |ze overlaid text| 000020f0 2c 20 64 6f 6e 27 74 20 4a 50 45 47 20 69 74 2e |, don't JPEG it.| 00002100 20 20 28 49 66 20 79 6f 75 20 77 61 6e 74 20 74 | (If you want t| 00002110 6f 0a 61 74 74 61 63 68 20 64 65 73 63 72 69 70 |o.attach descrip| 00002120 74 69 76 65 20 74 65 78 74 20 74 6f 20 61 20 4a |tive text to a J| 00002130 50 45 47 20 69 6d 61 67 65 2c 20 70 75 74 20 69 |PEG image, put i| 00002140 74 20 69 6e 20 61 73 20 61 20 63 6f 6d 6d 65 6e |t in as a commen| 00002150 74 20 72 61 74 68 65 72 20 74 68 61 6e 0a 74 72 |t rather than.tr| 00002160 79 69 6e 67 20 74 6f 20 6f 76 65 72 6c 61 79 20 |ying to overlay | 00002170 69 74 20 6f 6e 20 74 68 65 20 69 6d 61 67 65 2e |it on the image.| 00002180 20 20 4d 6f 73 74 20 72 65 63 65 6e 74 20 4a 50 | Most recent JP| 00002190 45 47 20 73 6f 66 74 77 61 72 65 20 63 61 6e 20 |EG software can | 000021a0 64 65 61 6c 20 77 69 74 68 0a 74 65 78 74 75 61 |deal with.textua| 000021b0 6c 20 63 6f 6d 6d 65 6e 74 73 20 69 6e 20 61 20 |l comments in a | 000021c0 4a 50 45 47 20 66 69 6c 65 2c 20 61 6c 74 68 6f |JPEG file, altho| 000021d0 75 67 68 20 6f 6c 64 65 72 20 76 69 65 77 65 72 |ugh older viewer| 000021e0 73 20 6d 61 79 20 6a 75 73 74 20 69 67 6e 6f 72 |s may just ignor| 000021f0 65 20 74 68 65 0a 63 6f 6d 6d 65 6e 74 73 2e 29 |e the.comments.)| 00002200 0a 0a 50 6c 61 69 6e 20 62 6c 61 63 6b 2d 61 6e |..Plain black-an| 00002210 64 2d 77 68 69 74 65 20 28 74 77 6f 20 6c 65 76 |d-white (two lev| 00002220 65 6c 29 20 69 6d 61 67 65 73 20 73 68 6f 75 6c |el) images shoul| 00002230 64 20 6e 65 76 65 72 20 62 65 20 63 6f 6e 76 65 |d never be conve| 00002240 72 74 65 64 20 74 6f 20 4a 50 45 47 3b 0a 74 68 |rted to JPEG;.th| 00002250 65 79 20 76 69 6f 6c 61 74 65 20 61 6c 6c 20 6f |ey violate all o| 00002260 66 20 74 68 65 20 63 6f 6e 64 69 74 69 6f 6e 73 |f the conditions| 00002270 20 67 69 76 65 6e 20 61 62 6f 76 65 2e 20 20 59 | given above. Y| 00002280 6f 75 20 6e 65 65 64 20 61 74 20 6c 65 61 73 74 |ou need at least| 00002290 20 61 62 6f 75 74 0a 31 36 20 67 72 61 79 20 6c | about.16 gray l| 000022a0 65 76 65 6c 73 20 62 65 66 6f 72 65 20 4a 50 45 |evels before JPE| 000022b0 47 20 69 73 20 75 73 65 66 75 6c 20 66 6f 72 20 |G is useful for | 000022c0 67 72 61 79 2d 73 63 61 6c 65 20 69 6d 61 67 65 |gray-scale image| 000022d0 73 2e 20 20 49 74 20 73 68 6f 75 6c 64 20 61 6c |s. It should al| 000022e0 73 6f 0a 62 65 20 6e 6f 74 65 64 20 74 68 61 74 |so.be noted that| 000022f0 20 47 49 46 20 69 73 20 6c 6f 73 73 6c 65 73 73 | GIF is lossless| 00002300 20 66 6f 72 20 67 72 61 79 2d 73 63 61 6c 65 20 | for gray-scale | 00002310 69 6d 61 67 65 73 20 6f 66 20 75 70 20 74 6f 20 |images of up to | 00002320 32 35 36 20 6c 65 76 65 6c 73 2c 0a 77 68 69 6c |256 levels,.whil| 00002330 65 20 4a 50 45 47 20 69 73 20 6e 6f 74 2e 0a 0a |e JPEG is not...| 00002340 49 66 20 79 6f 75 20 68 61 76 65 20 61 20 6c 61 |If you have a la| 00002350 72 67 65 20 6c 69 62 72 61 72 79 20 6f 66 20 47 |rge library of G| 00002360 49 46 20 69 6d 61 67 65 73 2c 20 79 6f 75 20 6d |IF images, you m| 00002370 61 79 20 77 61 6e 74 20 74 6f 20 73 61 76 65 20 |ay want to save | 00002380 73 70 61 63 65 20 62 79 0a 63 6f 6e 76 65 72 74 |space by.convert| 00002390 69 6e 67 20 74 68 65 20 47 49 46 73 20 74 6f 20 |ing the GIFs to | 000023a0 4a 50 45 47 2e 20 20 54 68 69 73 20 69 73 20 74 |JPEG. This is t| 000023b0 72 69 63 6b 69 65 72 20 74 68 61 6e 20 69 74 20 |rickier than it | 000023c0 6d 61 79 20 73 65 65 6d 20 2d 2d 2d 20 65 76 65 |may seem --- eve| 000023d0 6e 0a 77 68 65 6e 20 74 68 65 20 47 49 46 73 20 |n.when the GIFs | 000023e0 63 6f 6e 74 61 69 6e 20 70 68 6f 74 6f 67 72 61 |contain photogra| 000023f0 70 68 69 63 20 69 6d 61 67 65 73 2c 20 74 68 65 |phic images, the| 00002400 79 20 61 72 65 20 61 63 74 75 61 6c 6c 79 20 76 |y are actually v| 00002410 65 72 79 20 70 6f 6f 72 0a 73 6f 75 72 63 65 20 |ery poor.source | 00002420 6d 61 74 65 72 69 61 6c 20 66 6f 72 20 4a 50 45 |material for JPE| 00002430 47 2c 20 62 65 63 61 75 73 65 20 74 68 65 20 69 |G, because the i| 00002440 6d 61 67 65 73 20 68 61 76 65 20 62 65 65 6e 20 |mages have been | 00002450 63 6f 6c 6f 72 2d 72 65 64 75 63 65 64 2e 0a 4e |color-reduced..N| 00002460 6f 6e 2d 70 68 6f 74 6f 67 72 61 70 68 69 63 20 |on-photographic | 00002470 69 6d 61 67 65 73 20 73 68 6f 75 6c 64 20 67 65 |images should ge| 00002480 6e 65 72 61 6c 6c 79 20 62 65 20 6c 65 66 74 20 |nerally be left | 00002490 69 6e 20 47 49 46 20 66 6f 72 6d 2e 20 20 47 6f |in GIF form. Go| 000024a0 6f 64 2d 71 75 61 6c 69 74 79 0a 70 68 6f 74 6f |od-quality.photo| 000024b0 67 72 61 70 68 69 63 20 47 49 46 73 20 63 61 6e |graphic GIFs can| 000024c0 20 6f 66 74 65 6e 20 62 65 20 63 6f 6e 76 65 72 | often be conver| 000024d0 74 65 64 20 77 69 74 68 20 6e 6f 20 76 69 73 69 |ted with no visi| 000024e0 62 6c 65 20 71 75 61 6c 69 74 79 20 6c 6f 73 73 |ble quality loss| 000024f0 2c 20 62 75 74 0a 6f 6e 6c 79 20 69 66 20 79 6f |, but.only if yo| 00002500 75 20 6b 6e 6f 77 20 77 68 61 74 20 79 6f 75 20 |u know what you | 00002510 61 72 65 20 64 6f 69 6e 67 20 61 6e 64 20 79 6f |are doing and yo| 00002520 75 20 74 61 6b 65 20 74 68 65 20 74 69 6d 65 20 |u take the time | 00002530 74 6f 20 77 6f 72 6b 20 6f 6e 20 65 61 63 68 0a |to work on each.| 00002540 69 6d 61 67 65 20 69 6e 64 69 76 69 64 75 61 6c |image individual| 00002550 6c 79 2e 20 20 4f 74 68 65 72 77 69 73 65 20 79 |ly. Otherwise y| 00002560 6f 75 27 72 65 20 6c 69 6b 65 6c 79 20 74 6f 20 |ou're likely to | 00002570 6c 6f 73 65 20 61 20 6c 6f 74 20 6f 66 20 69 6d |lose a lot of im| 00002580 61 67 65 20 71 75 61 6c 69 74 79 0a 6f 72 20 77 |age quality.or w| 00002590 61 73 74 65 20 61 20 6c 6f 74 20 6f 66 20 64 69 |aste a lot of di| 000025a0 73 6b 20 73 70 61 63 65 20 2e 2e 2e 20 71 75 69 |sk space ... qui| 000025b0 74 65 20 70 6f 73 73 69 62 6c 79 20 62 6f 74 68 |te possibly both| 000025c0 2e 20 20 52 65 61 64 20 73 65 63 74 69 6f 6e 73 |. Read sections| 000025d0 20 38 20 61 6e 64 20 39 0a 69 66 20 79 6f 75 20 | 8 and 9.if you | 000025e0 77 61 6e 74 20 74 6f 20 63 6f 6e 76 65 72 74 20 |want to convert | 000025f0 47 49 46 73 20 74 6f 20 4a 50 45 47 2e 0a 0a 2d |GIFs to JPEG...-| 00002600 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00002610 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 53 |-------------..S| 00002620 75 62 6a 65 63 74 3a 20 5b 34 5d 20 48 6f 77 20 |ubject: [4] How | 00002630 77 65 6c 6c 20 64 6f 65 73 20 4a 50 45 47 20 63 |well does JPEG c| 00002640 6f 6d 70 72 65 73 73 20 69 6d 61 67 65 73 3f 0a |ompress images?.| 00002650 0a 56 65 72 79 20 77 65 6c 6c 20 69 6e 64 65 65 |.Very well indee| 00002660 64 2c 20 77 68 65 6e 20 77 6f 72 6b 69 6e 67 20 |d, when working | 00002670 77 69 74 68 20 69 74 73 20 69 6e 74 65 6e 64 65 |with its intende| 00002680 64 20 74 79 70 65 20 6f 66 20 69 6d 61 67 65 20 |d type of image | 00002690 28 70 68 6f 74 6f 67 72 61 70 68 73 0a 61 6e 64 |(photographs.and| 000026a0 20 73 75 63 68 6c 69 6b 65 29 2e 20 20 46 6f 72 | suchlike). For| 000026b0 20 66 75 6c 6c 2d 63 6f 6c 6f 72 20 69 6d 61 67 | full-color imag| 000026c0 65 73 2c 20 74 68 65 20 75 6e 63 6f 6d 70 72 65 |es, the uncompre| 000026d0 73 73 65 64 20 64 61 74 61 20 69 73 20 6e 6f 72 |ssed data is nor| 000026e0 6d 61 6c 6c 79 20 32 34 0a 62 69 74 73 2f 70 69 |mally 24.bits/pi| 000026f0 78 65 6c 2e 20 20 54 68 65 20 62 65 73 74 20 6b |xel. The best k| 00002700 6e 6f 77 6e 20 6c 6f 73 73 6c 65 73 73 20 63 6f |nown lossless co| 00002710 6d 70 72 65 73 73 69 6f 6e 20 6d 65 74 68 6f 64 |mpression method| 00002720 73 20 63 61 6e 20 63 6f 6d 70 72 65 73 73 20 73 |s can compress s| 00002730 75 63 68 0a 64 61 74 61 20 61 62 6f 75 74 20 32 |uch.data about 2| 00002740 3a 31 20 6f 6e 20 61 76 65 72 61 67 65 2e 20 20 |:1 on average. | 00002750 4a 50 45 47 20 63 61 6e 20 74 79 70 69 63 61 6c |JPEG can typical| 00002760 6c 79 20 61 63 68 69 65 76 65 20 31 30 3a 31 20 |ly achieve 10:1 | 00002770 74 6f 20 32 30 3a 31 0a 63 6f 6d 70 72 65 73 73 |to 20:1.compress| 00002780 69 6f 6e 20 77 69 74 68 6f 75 74 20 76 69 73 69 |ion without visi| 00002790 62 6c 65 20 6c 6f 73 73 2c 20 62 72 69 6e 67 69 |ble loss, bringi| 000027a0 6e 67 20 74 68 65 20 65 66 66 65 63 74 69 76 65 |ng the effective| 000027b0 20 73 74 6f 72 61 67 65 20 72 65 71 75 69 72 65 | storage require| 000027c0 6d 65 6e 74 0a 64 6f 77 6e 20 74 6f 20 31 20 74 |ment.down to 1 t| 000027d0 6f 20 32 20 62 69 74 73 2f 70 69 78 65 6c 2e 20 |o 2 bits/pixel. | 000027e0 20 33 30 3a 31 20 74 6f 20 35 30 3a 31 20 63 6f | 30:1 to 50:1 co| 000027f0 6d 70 72 65 73 73 69 6f 6e 20 69 73 20 70 6f 73 |mpression is pos| 00002800 73 69 62 6c 65 20 77 69 74 68 20 73 6d 61 6c 6c |sible with small| 00002810 0a 74 6f 20 6d 6f 64 65 72 61 74 65 20 64 65 66 |.to moderate def| 00002820 65 63 74 73 2c 20 77 68 69 6c 65 20 66 6f 72 20 |ects, while for | 00002830 76 65 72 79 2d 6c 6f 77 2d 71 75 61 6c 69 74 79 |very-low-quality| 00002840 20 70 75 72 70 6f 73 65 73 20 73 75 63 68 20 61 | purposes such a| 00002850 73 20 70 72 65 76 69 65 77 73 20 6f 72 0a 61 72 |s previews or.ar| 00002860 63 68 69 76 65 20 69 6e 64 65 78 65 73 2c 20 31 |chive indexes, 1| 00002870 30 30 3a 31 20 63 6f 6d 70 72 65 73 73 69 6f 6e |00:1 compression| 00002880 20 69 73 20 71 75 69 74 65 20 66 65 61 73 69 62 | is quite feasib| 00002890 6c 65 2e 20 20 41 6e 20 69 6d 61 67 65 20 63 6f |le. An image co| 000028a0 6d 70 72 65 73 73 65 64 0a 31 30 30 3a 31 20 77 |mpressed.100:1 w| 000028b0 69 74 68 20 4a 50 45 47 20 74 61 6b 65 73 20 75 |ith JPEG takes u| 000028c0 70 20 74 68 65 20 73 61 6d 65 20 73 70 61 63 65 |p the same space| 000028d0 20 61 73 20 61 20 66 75 6c 6c 2d 63 6f 6c 6f 72 | as a full-color| 000028e0 20 6f 6e 65 2d 74 65 6e 74 68 2d 73 63 61 6c 65 | one-tenth-scale| 000028f0 0a 74 68 75 6d 62 6e 61 69 6c 20 69 6d 61 67 65 |.thumbnail image| 00002900 2c 20 79 65 74 20 69 74 20 72 65 74 61 69 6e 73 |, yet it retains| 00002910 20 6d 75 63 68 20 6d 6f 72 65 20 64 65 74 61 69 | much more detai| 00002920 6c 20 74 68 61 6e 20 73 75 63 68 20 61 20 74 68 |l than such a th| 00002930 75 6d 62 6e 61 69 6c 2e 0a 0a 46 6f 72 20 63 6f |umbnail...For co| 00002940 6d 70 61 72 69 73 6f 6e 2c 20 61 20 47 49 46 20 |mparison, a GIF | 00002950 76 65 72 73 69 6f 6e 20 6f 66 20 74 68 65 20 73 |version of the s| 00002960 61 6d 65 20 69 6d 61 67 65 20 77 6f 75 6c 64 20 |ame image would | 00002970 73 74 61 72 74 20 6f 75 74 20 62 79 0a 73 61 63 |start out by.sac| 00002980 72 69 66 69 63 69 6e 67 20 6d 6f 73 74 20 6f 66 |rificing most of| 00002990 20 74 68 65 20 63 6f 6c 6f 72 20 69 6e 66 6f 72 | the color infor| 000029a0 6d 61 74 69 6f 6e 20 74 6f 20 72 65 64 75 63 65 |mation to reduce| 000029b0 20 74 68 65 20 69 6d 61 67 65 20 74 6f 20 32 35 | the image to 25| 000029c0 36 20 63 6f 6c 6f 72 73 0a 28 38 20 62 69 74 73 |6 colors.(8 bits| 000029d0 2f 70 69 78 65 6c 29 2e 20 20 54 68 69 73 20 70 |/pixel). This p| 000029e0 72 6f 76 69 64 65 73 20 33 3a 31 20 63 6f 6d 70 |rovides 3:1 comp| 000029f0 72 65 73 73 69 6f 6e 2e 20 20 47 49 46 20 68 61 |ression. GIF ha| 00002a00 73 20 61 64 64 69 74 69 6f 6e 61 6c 20 22 4c 5a |s additional "LZ| 00002a10 57 22 0a 63 6f 6d 70 72 65 73 73 69 6f 6e 20 62 |W".compression b| 00002a20 75 69 6c 74 20 69 6e 2c 20 62 75 74 20 4c 5a 57 |uilt in, but LZW| 00002a30 20 64 6f 65 73 6e 27 74 20 77 6f 72 6b 20 76 65 | doesn't work ve| 00002a40 72 79 20 77 65 6c 6c 20 6f 6e 20 74 79 70 69 63 |ry well on typic| 00002a50 61 6c 20 70 68 6f 74 6f 67 72 61 70 68 69 63 0a |al photographic.| 00002a60 64 61 74 61 3b 20 61 74 20 6d 6f 73 74 20 79 6f |data; at most yo| 00002a70 75 20 6d 61 79 20 67 65 74 20 35 3a 31 20 63 6f |u may get 5:1 co| 00002a80 6d 70 72 65 73 73 69 6f 6e 20 6f 76 65 72 61 6c |mpression overal| 00002a90 6c 2c 20 61 6e 64 20 69 74 27 73 20 6e 6f 74 20 |l, and it's not | 00002aa0 61 74 20 61 6c 6c 0a 75 6e 63 6f 6d 6d 6f 6e 20 |at all.uncommon | 00002ab0 66 6f 72 20 4c 5a 57 20 74 6f 20 62 65 20 61 20 |for LZW to be a | 00002ac0 6e 65 74 20 6c 6f 73 73 20 28 69 2e 65 2e 2c 20 |net loss (i.e., | 00002ad0 6c 65 73 73 20 74 68 61 6e 20 33 3a 31 20 6f 76 |less than 3:1 ov| 00002ae0 65 72 61 6c 6c 20 63 6f 6d 70 72 65 73 73 69 6f |erall compressio| 00002af0 6e 29 2e 0a 4c 5a 57 20 2a 64 6f 65 73 2a 20 77 |n)..LZW *does* w| 00002b00 6f 72 6b 20 77 65 6c 6c 20 6f 6e 20 73 69 6d 70 |ork well on simp| 00002b10 6c 65 72 20 69 6d 61 67 65 73 20 73 75 63 68 20 |ler images such | 00002b20 61 73 20 6c 69 6e 65 20 64 72 61 77 69 6e 67 73 |as line drawings| 00002b30 2c 20 77 68 69 63 68 20 69 73 20 77 68 79 0a 47 |, which is why.G| 00002b40 49 46 20 68 61 6e 64 6c 65 73 20 74 68 61 74 20 |IF handles that | 00002b50 73 6f 72 74 20 6f 66 20 69 6d 61 67 65 20 73 6f |sort of image so| 00002b60 20 77 65 6c 6c 2e 20 20 57 68 65 6e 20 61 20 4a | well. When a J| 00002b70 50 45 47 20 66 69 6c 65 20 69 73 20 6d 61 64 65 |PEG file is made| 00002b80 20 66 72 6f 6d 0a 66 75 6c 6c 2d 63 6f 6c 6f 72 | from.full-color| 00002b90 20 70 68 6f 74 6f 67 72 61 70 68 69 63 20 64 61 | photographic da| 00002ba0 74 61 2c 20 75 73 69 6e 67 20 61 20 71 75 61 6c |ta, using a qual| 00002bb0 69 74 79 20 73 65 74 74 69 6e 67 20 6a 75 73 74 |ity setting just| 00002bc0 20 68 69 67 68 20 65 6e 6f 75 67 68 20 74 6f 0a | high enough to.| 00002bd0 70 72 65 76 65 6e 74 20 76 69 73 69 62 6c 65 20 |prevent visible | 00002be0 6c 6f 73 73 2c 20 74 68 65 20 4a 50 45 47 20 77 |loss, the JPEG w| 00002bf0 69 6c 6c 20 74 79 70 69 63 61 6c 6c 79 20 62 65 |ill typically be| 00002c00 20 61 20 66 61 63 74 6f 72 20 6f 66 20 66 6f 75 | a factor of fou| 00002c10 72 20 6f 72 20 66 69 76 65 0a 73 6d 61 6c 6c 65 |r or five.smalle| 00002c20 72 20 74 68 61 6e 20 61 20 47 49 46 20 66 69 6c |r than a GIF fil| 00002c30 65 20 6d 61 64 65 20 66 72 6f 6d 20 74 68 65 20 |e made from the | 00002c40 73 61 6d 65 20 64 61 74 61 2e 0a 0a 47 72 61 79 |same data...Gray| 00002c50 2d 73 63 61 6c 65 20 69 6d 61 67 65 73 20 64 6f |-scale images do| 00002c60 20 6e 6f 74 20 63 6f 6d 70 72 65 73 73 20 62 79 | not compress by| 00002c70 20 73 75 63 68 20 6c 61 72 67 65 20 66 61 63 74 | such large fact| 00002c80 6f 72 73 2e 20 20 42 65 63 61 75 73 65 20 74 68 |ors. Because th| 00002c90 65 20 68 75 6d 61 6e 0a 65 79 65 20 69 73 20 6d |e human.eye is m| 00002ca0 75 63 68 20 6d 6f 72 65 20 73 65 6e 73 69 74 69 |uch more sensiti| 00002cb0 76 65 20 74 6f 20 62 72 69 67 68 74 6e 65 73 73 |ve to brightness| 00002cc0 20 76 61 72 69 61 74 69 6f 6e 73 20 74 68 61 6e | variations than| 00002cd0 20 74 6f 20 68 75 65 20 76 61 72 69 61 74 69 6f | to hue variatio| 00002ce0 6e 73 2c 0a 4a 50 45 47 20 63 61 6e 20 63 6f 6d |ns,.JPEG can com| 00002cf0 70 72 65 73 73 20 68 75 65 20 64 61 74 61 20 6d |press hue data m| 00002d00 6f 72 65 20 68 65 61 76 69 6c 79 20 74 68 61 6e |ore heavily than| 00002d10 20 62 72 69 67 68 74 6e 65 73 73 20 28 67 72 61 | brightness (gra| 00002d20 79 2d 73 63 61 6c 65 29 20 64 61 74 61 2e 0a 41 |y-scale) data..A| 00002d30 20 67 72 61 79 2d 73 63 61 6c 65 20 4a 50 45 47 | gray-scale JPEG| 00002d40 20 66 69 6c 65 20 69 73 20 67 65 6e 65 72 61 6c | file is general| 00002d50 6c 79 20 6f 6e 6c 79 20 61 62 6f 75 74 20 31 30 |ly only about 10| 00002d60 25 2d 32 35 25 20 73 6d 61 6c 6c 65 72 20 74 68 |%-25% smaller th| 00002d70 61 6e 20 61 0a 66 75 6c 6c 2d 63 6f 6c 6f 72 20 |an a.full-color | 00002d80 4a 50 45 47 20 66 69 6c 65 20 6f 66 20 73 69 6d |JPEG file of sim| 00002d90 69 6c 61 72 20 76 69 73 75 61 6c 20 71 75 61 6c |ilar visual qual| 00002da0 69 74 79 2e 20 20 42 75 74 20 74 68 65 20 75 6e |ity. But the un| 00002db0 63 6f 6d 70 72 65 73 73 65 64 0a 67 72 61 79 2d |compressed.gray-| 00002dc0 73 63 61 6c 65 20 64 61 74 61 20 69 73 20 6f 6e |scale data is on| 00002dd0 6c 79 20 38 20 62 69 74 73 2f 70 69 78 65 6c 2c |ly 8 bits/pixel,| 00002de0 20 6f 72 20 6f 6e 65 2d 74 68 69 72 64 20 74 68 | or one-third th| 00002df0 65 20 73 69 7a 65 20 6f 66 20 74 68 65 20 63 6f |e size of the co| 00002e00 6c 6f 72 0a 64 61 74 61 2c 20 73 6f 20 74 68 65 |lor.data, so the| 00002e10 20 63 61 6c 63 75 6c 61 74 65 64 20 63 6f 6d 70 | calculated comp| 00002e20 72 65 73 73 69 6f 6e 20 72 61 74 69 6f 20 69 73 |ression ratio is| 00002e30 20 6d 75 63 68 20 6c 6f 77 65 72 2e 20 20 54 68 | much lower. Th| 00002e40 65 20 74 68 72 65 73 68 6f 6c 64 20 6f 66 0a 76 |e threshold of.v| 00002e50 69 73 69 62 6c 65 20 6c 6f 73 73 20 69 73 20 6f |isible loss is o| 00002e60 66 74 65 6e 20 61 72 6f 75 6e 64 20 35 3a 31 20 |ften around 5:1 | 00002e70 63 6f 6d 70 72 65 73 73 69 6f 6e 20 66 6f 72 20 |compression for | 00002e80 67 72 61 79 2d 73 63 61 6c 65 20 69 6d 61 67 65 |gray-scale image| 00002e90 73 2e 0a 0a 54 68 65 20 65 78 61 63 74 20 74 68 |s...The exact th| 00002ea0 72 65 73 68 6f 6c 64 20 61 74 20 77 68 69 63 68 |reshold at which| 00002eb0 20 65 72 72 6f 72 73 20 62 65 63 6f 6d 65 20 76 | errors become v| 00002ec0 69 73 69 62 6c 65 20 64 65 70 65 6e 64 73 20 6f |isible depends o| 00002ed0 6e 20 79 6f 75 72 20 76 69 65 77 69 6e 67 0a 63 |n your viewing.c| 00002ee0 6f 6e 64 69 74 69 6f 6e 73 2e 20 20 54 68 65 20 |onditions. The | 00002ef0 73 6d 61 6c 6c 65 72 20 61 6e 20 69 6e 64 69 76 |smaller an indiv| 00002f00 69 64 75 61 6c 20 70 69 78 65 6c 2c 20 74 68 65 |idual pixel, the| 00002f10 20 68 61 72 64 65 72 20 69 74 20 69 73 20 74 6f | harder it is to| 00002f20 20 73 65 65 20 61 6e 0a 65 72 72 6f 72 3b 20 73 | see an.error; s| 00002f30 6f 20 65 72 72 6f 72 73 20 61 72 65 20 6d 6f 72 |o errors are mor| 00002f40 65 20 76 69 73 69 62 6c 65 20 6f 6e 20 61 20 63 |e visible on a c| 00002f50 6f 6d 70 75 74 65 72 20 73 63 72 65 65 6e 20 28 |omputer screen (| 00002f60 61 74 20 6d 61 79 62 65 20 37 30 0a 64 6f 74 73 |at maybe 70.dots| 00002f70 2f 69 6e 63 68 29 20 74 68 61 6e 20 6f 6e 20 61 |/inch) than on a| 00002f80 20 68 69 67 68 2d 71 75 61 6c 69 74 79 20 63 6f | high-quality co| 00002f90 6c 6f 72 20 70 72 69 6e 74 6f 75 74 20 28 33 30 |lor printout (30| 00002fa0 30 20 6f 72 20 6d 6f 72 65 20 64 6f 74 73 2f 69 |0 or more dots/i| 00002fb0 6e 63 68 29 2e 0a 54 68 75 73 20 61 20 68 69 67 |nch)..Thus a hig| 00002fc0 68 65 72 2d 72 65 73 6f 6c 75 74 69 6f 6e 20 69 |her-resolution i| 00002fd0 6d 61 67 65 20 63 61 6e 20 74 6f 6c 65 72 61 74 |mage can tolerat| 00002fe0 65 20 6d 6f 72 65 20 63 6f 6d 70 72 65 73 73 69 |e more compressi| 00002ff0 6f 6e 20 2e 2e 2e 20 77 68 69 63 68 20 69 73 0a |on ... which is.| 00003000 66 6f 72 74 75 6e 61 74 65 20 63 6f 6e 73 69 64 |fortunate consid| 00003010 65 72 69 6e 67 20 69 74 27 73 20 6d 75 63 68 20 |ering it's much | 00003020 62 69 67 67 65 72 20 74 6f 20 73 74 61 72 74 20 |bigger to start | 00003030 77 69 74 68 2e 20 20 54 68 65 20 6e 75 6d 62 65 |with. The numbe| 00003040 72 73 20 71 75 6f 74 65 64 0a 61 62 6f 76 65 20 |rs quoted.above | 00003050 61 72 65 20 74 79 70 69 63 61 6c 20 66 6f 72 20 |are typical for | 00003060 73 63 72 65 65 6e 20 76 69 65 77 69 6e 67 2e 20 |screen viewing. | 00003070 20 41 6c 73 6f 20 6e 6f 74 65 20 74 68 61 74 20 | Also note that | 00003080 74 68 65 20 74 68 72 65 73 68 6f 6c 64 20 6f 66 |the threshold of| 00003090 0a 76 69 73 69 62 6c 65 20 65 72 72 6f 72 20 76 |.visible error v| 000030a0 61 72 69 65 73 20 63 6f 6e 73 69 64 65 72 61 62 |aries considerab| 000030b0 6c 79 20 61 63 72 6f 73 73 20 69 6d 61 67 65 73 |ly across images| 000030c0 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |...-------------| 000030d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 000030e0 2d 0a 0a 53 75 62 6a 65 63 74 3a 20 5b 35 5d 20 |-..Subject: [5] | 000030f0 57 68 61 74 20 61 72 65 20 67 6f 6f 64 20 22 71 |What are good "q| 00003100 75 61 6c 69 74 79 22 20 73 65 74 74 69 6e 67 73 |uality" settings| 00003110 20 66 6f 72 20 4a 50 45 47 3f 0a 0a 4d 6f 73 74 | for JPEG?..Most| 00003120 20 4a 50 45 47 20 63 6f 6d 70 72 65 73 73 6f 72 | JPEG compressor| 00003130 73 20 6c 65 74 20 79 6f 75 20 70 69 63 6b 20 61 |s let you pick a| 00003140 20 66 69 6c 65 20 73 69 7a 65 20 76 73 2e 20 69 | file size vs. i| 00003150 6d 61 67 65 20 71 75 61 6c 69 74 79 20 74 72 61 |mage quality tra| 00003160 64 65 6f 66 66 20 62 79 0a 73 65 6c 65 63 74 69 |deoff by.selecti| 00003170 6e 67 20 61 20 71 75 61 6c 69 74 79 20 73 65 74 |ng a quality set| 00003180 74 69 6e 67 2e 20 20 54 68 65 72 65 20 73 65 65 |ting. There see| 00003190 6d 73 20 74 6f 20 62 65 20 77 69 64 65 73 70 72 |ms to be widespr| 000031a0 65 61 64 20 63 6f 6e 66 75 73 69 6f 6e 20 61 62 |ead confusion ab| 000031b0 6f 75 74 0a 74 68 65 20 6d 65 61 6e 69 6e 67 20 |out.the meaning | 000031c0 6f 66 20 74 68 65 73 65 20 73 65 74 74 69 6e 67 |of these setting| 000031d0 73 2e 20 20 22 51 75 61 6c 69 74 79 20 39 35 22 |s. "Quality 95"| 000031e0 20 64 6f 65 73 20 4e 4f 54 20 6d 65 61 6e 20 22 | does NOT mean "| 000031f0 6b 65 65 70 20 39 35 25 20 6f 66 20 74 68 65 0a |keep 95% of the.| 00003200 69 6e 66 6f 72 6d 61 74 69 6f 6e 22 2c 20 61 73 |information", as| 00003210 20 73 6f 6d 65 20 68 61 76 65 20 63 6c 61 69 6d | some have claim| 00003220 65 64 2e 20 20 54 68 65 20 71 75 61 6c 69 74 79 |ed. The quality| 00003230 20 73 63 61 6c 65 20 69 73 20 70 75 72 65 6c 79 | scale is purely| 00003240 20 61 72 62 69 74 72 61 72 79 3b 0a 69 74 27 73 | arbitrary;.it's| 00003250 20 6e 6f 74 20 61 20 70 65 72 63 65 6e 74 61 67 | not a percentag| 00003260 65 20 6f 66 20 61 6e 79 74 68 69 6e 67 2e 0a 0a |e of anything...| 00003270 49 6e 20 66 61 63 74 2c 20 71 75 61 6c 69 74 79 |In fact, quality| 00003280 20 73 63 61 6c 65 73 20 61 72 65 6e 27 74 20 65 | scales aren't e| 00003290 76 65 6e 20 73 74 61 6e 64 61 72 64 69 7a 65 64 |ven standardized| 000032a0 20 61 63 72 6f 73 73 20 4a 50 45 47 20 70 72 6f | across JPEG pro| 000032b0 67 72 61 6d 73 2e 0a 54 68 65 20 71 75 61 6c 69 |grams..The quali| 000032c0 74 79 20 73 65 74 74 69 6e 67 73 20 64 69 73 63 |ty settings disc| 000032d0 75 73 73 65 64 20 69 6e 20 74 68 69 73 20 61 72 |ussed in this ar| 000032e0 74 69 63 6c 65 20 61 70 70 6c 79 20 74 6f 20 74 |ticle apply to t| 000032f0 68 65 20 66 72 65 65 20 49 4a 47 20 4a 50 45 47 |he free IJG JPEG| 00003300 0a 73 6f 66 74 77 61 72 65 20 28 64 65 73 63 72 |.software (descr| 00003310 69 62 65 64 20 69 6e 20 70 61 72 74 20 32 29 2c |ibed in part 2),| 00003320 20 61 6e 64 20 74 6f 20 6d 61 6e 79 20 70 72 6f | and to many pro| 00003330 67 72 61 6d 73 20 62 61 73 65 64 20 6f 6e 20 69 |grams based on i| 00003340 74 2e 20 20 4f 74 68 65 72 0a 4a 50 45 47 20 69 |t. Other.JPEG i| 00003350 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2c 20 |mplementations, | 00003360 6e 6f 74 61 62 6c 79 20 41 70 70 6c 65 27 73 20 |notably Apple's | 00003370 61 6e 64 20 48 53 49 27 73 2c 20 75 73 65 20 63 |and HSI's, use c| 00003380 6f 6d 70 6c 65 74 65 6c 79 20 64 69 66 66 65 72 |ompletely differ| 00003390 65 6e 74 0a 71 75 61 6c 69 74 79 20 73 63 61 6c |ent.quality scal| 000033a0 65 73 3b 20 66 6f 72 20 69 6e 73 74 61 6e 63 65 |es; for instance| 000033b0 2c 20 41 70 70 6c 65 27 73 20 73 63 61 6c 65 20 |, Apple's scale | 000033c0 72 75 6e 73 20 66 72 6f 6d 20 30 2d 34 2c 20 6e |runs from 0-4, n| 000033d0 6f 74 20 30 2d 31 30 30 2e 20 20 53 6f 6d 65 0a |ot 0-100. Some.| 000033e0 70 72 6f 67 72 61 6d 73 20 64 6f 6e 27 74 20 65 |programs don't e| 000033f0 76 65 6e 20 70 72 6f 76 69 64 65 20 61 20 6e 75 |ven provide a nu| 00003400 6d 65 72 69 63 20 73 63 61 6c 65 2c 20 6a 75 73 |meric scale, jus| 00003410 74 20 22 68 69 67 68 22 2f 22 6d 65 64 69 75 6d |t "high"/"medium| 00003420 22 2f 22 6c 6f 77 22 0a 73 74 79 6c 65 20 63 68 |"/"low".style ch| 00003430 6f 69 63 65 73 2e 20 20 28 46 6f 72 74 75 6e 61 |oices. (Fortuna| 00003440 74 65 6c 79 2c 20 74 68 69 73 20 64 6f 65 73 6e |tely, this doesn| 00003450 27 74 20 70 72 65 76 65 6e 74 20 64 69 66 66 65 |'t prevent diffe| 00003460 72 65 6e 74 20 69 6d 70 6c 65 6d 65 6e 74 61 74 |rent implementat| 00003470 69 6f 6e 73 0a 66 72 6f 6d 20 65 78 63 68 61 6e |ions.from exchan| 00003480 67 69 6e 67 20 63 6f 6d 70 72 65 73 73 65 64 20 |ging compressed | 00003490 66 69 6c 65 73 2e 29 0a 0a 49 6e 20 6d 6f 73 74 |files.)..In most| 000034a0 20 63 61 73 65 73 20 74 68 65 20 75 73 65 72 27 | cases the user'| 000034b0 73 20 67 6f 61 6c 20 69 73 20 74 6f 20 70 69 63 |s goal is to pic| 000034c0 6b 20 74 68 65 20 6c 6f 77 65 73 74 20 71 75 61 |k the lowest qua| 000034d0 6c 69 74 79 20 73 65 74 74 69 6e 67 2c 20 6f 72 |lity setting, or| 000034e0 0a 73 6d 61 6c 6c 65 73 74 20 66 69 6c 65 20 73 |.smallest file s| 000034f0 69 7a 65 2c 20 74 68 61 74 20 64 65 63 6f 6d 70 |ize, that decomp| 00003500 72 65 73 73 65 73 20 69 6e 74 6f 20 61 6e 20 69 |resses into an i| 00003510 6d 61 67 65 20 69 6e 64 69 73 74 69 6e 67 75 69 |mage indistingui| 00003520 73 68 61 62 6c 65 20 66 72 6f 6d 0a 74 68 65 20 |shable from.the | 00003530 6f 72 69 67 69 6e 61 6c 2e 20 20 54 68 69 73 20 |original. This | 00003540 73 65 74 74 69 6e 67 20 77 69 6c 6c 20 76 61 72 |setting will var| 00003550 79 20 66 72 6f 6d 20 6f 6e 65 20 69 6d 61 67 65 |y from one image| 00003560 20 74 6f 20 61 6e 6f 74 68 65 72 20 61 6e 64 20 | to another and | 00003570 66 72 6f 6d 20 6f 6e 65 0a 6f 62 73 65 72 76 65 |from one.observe| 00003580 72 20 74 6f 20 61 6e 6f 74 68 65 72 2c 20 62 75 |r to another, bu| 00003590 74 20 68 65 72 65 20 61 72 65 20 73 6f 6d 65 20 |t here are some | 000035a0 72 75 6c 65 73 20 6f 66 20 74 68 75 6d 62 2e 0a |rules of thumb..| 000035b0 0a 46 6f 72 20 67 6f 6f 64 2d 71 75 61 6c 69 74 |.For good-qualit| 000035c0 79 2c 20 66 75 6c 6c 2d 63 6f 6c 6f 72 20 73 6f |y, full-color so| 000035d0 75 72 63 65 20 69 6d 61 67 65 73 2c 20 74 68 65 |urce images, the| 000035e0 20 64 65 66 61 75 6c 74 20 49 4a 47 20 71 75 61 | default IJG qua| 000035f0 6c 69 74 79 20 73 65 74 74 69 6e 67 0a 28 51 20 |lity setting.(Q | 00003600 37 35 29 20 69 73 20 76 65 72 79 20 6f 66 74 65 |75) is very ofte| 00003610 6e 20 74 68 65 20 62 65 73 74 20 63 68 6f 69 63 |n the best choic| 00003620 65 2e 20 20 54 68 69 73 20 73 65 74 74 69 6e 67 |e. This setting| 00003630 20 69 73 20 61 62 6f 75 74 20 74 68 65 20 6c 6f | is about the lo| 00003640 77 65 73 74 20 79 6f 75 0a 63 61 6e 20 67 6f 20 |west you.can go | 00003650 77 69 74 68 6f 75 74 20 65 78 70 65 63 74 69 6e |without expectin| 00003660 67 20 74 6f 20 73 65 65 20 64 65 66 65 63 74 73 |g to see defects| 00003670 20 69 6e 20 61 20 74 79 70 69 63 61 6c 20 69 6d | in a typical im| 00003680 61 67 65 2e 20 20 54 72 79 20 51 20 37 35 20 66 |age. Try Q 75 f| 00003690 69 72 73 74 3b 0a 69 66 20 79 6f 75 20 73 65 65 |irst;.if you see| 000036a0 20 64 65 66 65 63 74 73 2c 20 74 68 65 6e 20 67 | defects, then g| 000036b0 6f 20 75 70 2e 0a 0a 49 66 20 74 68 65 20 69 6d |o up...If the im| 000036c0 61 67 65 20 77 61 73 20 6c 65 73 73 20 74 68 61 |age was less tha| 000036d0 6e 20 70 65 72 66 65 63 74 20 71 75 61 6c 69 74 |n perfect qualit| 000036e0 79 20 74 6f 20 62 65 67 69 6e 20 77 69 74 68 2c |y to begin with,| 000036f0 20 79 6f 75 20 6d 69 67 68 74 20 62 65 20 61 62 | you might be ab| 00003700 6c 65 0a 74 6f 20 64 72 6f 70 20 64 6f 77 6e 20 |le.to drop down | 00003710 74 6f 20 51 20 35 30 20 77 69 74 68 6f 75 74 20 |to Q 50 without | 00003720 6f 62 6a 65 63 74 69 6f 6e 61 62 6c 65 20 64 65 |objectionable de| 00003730 67 72 61 64 61 74 69 6f 6e 2e 20 20 4f 6e 20 74 |gradation. On t| 00003740 68 65 20 6f 74 68 65 72 20 68 61 6e 64 2c 0a 79 |he other hand,.y| 00003750 6f 75 20 6d 69 67 68 74 20 6e 65 65 64 20 74 6f |ou might need to| 00003760 20 67 6f 20 74 6f 20 61 20 2a 68 69 67 68 65 72 | go to a *higher| 00003770 2a 20 71 75 61 6c 69 74 79 20 73 65 74 74 69 6e |* quality settin| 00003780 67 20 74 6f 20 61 76 6f 69 64 20 66 75 72 74 68 |g to avoid furth| 00003790 65 72 20 6c 6f 73 73 2e 0a 54 68 69 73 20 69 73 |er loss..This is| 000037a0 20 6f 66 74 65 6e 20 6e 65 63 65 73 73 61 72 79 | often necessary| 000037b0 20 69 66 20 74 68 65 20 69 6d 61 67 65 20 63 6f | if the image co| 000037c0 6e 74 61 69 6e 73 20 64 69 74 68 65 72 69 6e 67 |ntains dithering| 000037d0 20 6f 72 20 6d 6f 69 72 65 20 70 61 74 74 65 72 | or moire patter| 000037e0 6e 73 0a 28 73 65 65 20 22 5b 39 5d 20 57 68 61 |ns.(see "[9] Wha| 000037f0 74 20 61 72 65 20 73 6f 6d 65 20 72 75 6c 65 73 |t are some rules| 00003800 20 6f 66 20 74 68 75 6d 62 20 66 6f 72 20 63 6f | of thumb for co| 00003810 6e 76 65 72 74 69 6e 67 20 47 49 46 20 69 6d 61 |nverting GIF ima| 00003820 67 65 73 20 74 6f 20 4a 50 45 47 3f 22 29 2e 0a |ges to JPEG?")..| 00003830 0a 45 78 63 65 70 74 20 66 6f 72 20 65 78 70 65 |.Except for expe| 00003840 72 69 6d 65 6e 74 61 6c 20 70 75 72 70 6f 73 65 |rimental purpose| 00003850 73 2c 20 6e 65 76 65 72 20 67 6f 20 61 62 6f 76 |s, never go abov| 00003860 65 20 61 62 6f 75 74 20 51 20 39 35 3b 20 75 73 |e about Q 95; us| 00003870 69 6e 67 20 51 20 31 30 30 0a 77 69 6c 6c 20 70 |ing Q 100.will p| 00003880 72 6f 64 75 63 65 20 61 20 66 69 6c 65 20 74 77 |roduce a file tw| 00003890 6f 20 6f 72 20 74 68 72 65 65 20 74 69 6d 65 73 |o or three times| 000038a0 20 61 73 20 6c 61 72 67 65 20 61 73 20 51 20 39 | as large as Q 9| 000038b0 35 2c 20 62 75 74 20 6f 66 20 68 61 72 64 6c 79 |5, but of hardly| 000038c0 20 61 6e 79 0a 62 65 74 74 65 72 20 71 75 61 6c | any.better qual| 000038d0 69 74 79 2e 20 20 49 66 20 79 6f 75 20 73 65 65 |ity. If you see| 000038e0 20 61 20 66 69 6c 65 20 6d 61 64 65 20 77 69 74 | a file made wit| 000038f0 68 20 51 20 31 30 30 2c 20 69 74 27 73 20 61 20 |h Q 100, it's a | 00003900 70 72 65 74 74 79 20 73 75 72 65 20 73 69 67 6e |pretty sure sign| 00003910 0a 74 68 61 74 20 74 68 65 20 6d 61 6b 65 72 20 |.that the maker | 00003920 64 69 64 6e 27 74 20 6b 6e 6f 77 20 77 68 61 74 |didn't know what| 00003930 20 68 65 2f 73 68 65 20 77 61 73 20 64 6f 69 6e | he/she was doin| 00003940 67 2e 0a 0a 49 66 20 79 6f 75 20 77 61 6e 74 20 |g...If you want | 00003950 61 20 76 65 72 79 20 73 6d 61 6c 6c 20 66 69 6c |a very small fil| 00003960 65 20 28 73 61 79 20 66 6f 72 20 70 72 65 76 69 |e (say for previ| 00003970 65 77 20 6f 72 20 69 6e 64 65 78 69 6e 67 20 70 |ew or indexing p| 00003980 75 72 70 6f 73 65 73 29 20 61 6e 64 20 61 72 65 |urposes) and are| 00003990 0a 70 72 65 70 61 72 65 64 20 74 6f 20 74 6f 6c |.prepared to tol| 000039a0 65 72 61 74 65 20 6c 61 72 67 65 20 64 65 66 65 |erate large defe| 000039b0 63 74 73 2c 20 61 20 51 20 73 65 74 74 69 6e 67 |cts, a Q setting| 000039c0 20 69 6e 20 74 68 65 20 72 61 6e 67 65 20 6f 66 | in the range of| 000039d0 20 35 20 74 6f 20 31 30 20 69 73 0a 61 62 6f 75 | 5 to 10 is.abou| 000039e0 74 20 72 69 67 68 74 2e 20 20 51 20 32 20 6f 72 |t right. Q 2 or| 000039f0 20 73 6f 20 6d 61 79 20 62 65 20 61 6d 75 73 69 | so may be amusi| 00003a00 6e 67 20 61 73 20 22 6f 70 20 61 72 74 22 2e 20 |ng as "op art". | 00003a10 20 28 49 74 27 73 20 77 6f 72 74 68 20 6d 65 6e | (It's worth men| 00003a20 74 69 6f 6e 69 6e 67 0a 74 68 61 74 20 74 68 65 |tioning.that the| 00003a30 20 63 75 72 72 65 6e 74 20 49 4a 47 20 73 6f 66 | current IJG sof| 00003a40 74 77 61 72 65 20 69 73 20 6e 6f 74 20 6f 70 74 |tware is not opt| 00003a50 69 6d 69 7a 65 64 20 66 6f 72 20 73 75 63 68 20 |imized for such | 00003a60 6c 6f 77 20 71 75 61 6c 69 74 79 20 66 61 63 74 |low quality fact| 00003a70 6f 72 73 2e 0a 46 75 74 75 72 65 20 76 65 72 73 |ors..Future vers| 00003a80 69 6f 6e 73 20 6d 61 79 20 61 63 68 69 65 76 65 |ions may achieve| 00003a90 20 62 65 74 74 65 72 20 69 6d 61 67 65 20 71 75 | better image qu| 00003aa0 61 6c 69 74 79 20 66 6f 72 20 74 68 65 20 73 61 |ality for the sa| 00003ab0 6d 65 20 66 69 6c 65 20 73 69 7a 65 20 61 74 0a |me file size at.| 00003ac0 6c 6f 77 20 71 75 61 6c 69 74 79 20 73 65 74 74 |low quality sett| 00003ad0 69 6e 67 73 2e 29 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d |ings.)..--------| 00003ae0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00003af0 2d 2d 2d 2d 2d 2d 0a 0a 53 75 62 6a 65 63 74 3a |------..Subject:| 00003b00 20 5b 36 5d 20 57 68 65 72 65 20 63 61 6e 20 49 | [6] Where can I| 00003b10 20 67 65 74 20 4a 50 45 47 20 73 6f 66 74 77 61 | get JPEG softwa| 00003b20 72 65 3f 0a 0a 53 65 65 20 70 61 72 74 20 32 20 |re?..See part 2 | 00003b30 6f 66 20 74 68 69 73 20 46 41 51 20 66 6f 72 20 |of this FAQ for | 00003b40 72 65 63 6f 6d 6d 65 6e 64 61 74 69 6f 6e 73 20 |recommendations | 00003b50 61 62 6f 75 74 20 70 72 6f 67 72 61 6d 73 20 66 |about programs f| 00003b60 6f 72 20 70 61 72 74 69 63 75 6c 61 72 0a 73 79 |or particular.sy| 00003b70 73 74 65 6d 73 2e 20 20 50 61 72 74 20 32 20 61 |stems. Part 2 a| 00003b80 6c 73 6f 20 74 65 6c 6c 73 20 77 68 65 72 65 20 |lso tells where | 00003b90 74 6f 20 66 69 6e 64 20 66 72 65 65 20 43 20 73 |to find free C s| 00003ba0 6f 75 72 63 65 20 63 6f 64 65 20 66 6f 72 0a 69 |ource code for.i| 00003bb0 6d 70 6c 65 6d 65 6e 74 69 6e 67 20 4a 50 45 47 |mplementing JPEG| 00003bc0 2c 20 69 6e 20 63 61 73 65 20 79 6f 75 20 77 61 |, in case you wa| 00003bd0 6e 74 20 74 6f 20 77 72 69 74 65 20 79 6f 75 72 |nt to write your| 00003be0 20 6f 77 6e 20 70 72 6f 67 72 61 6d 73 20 75 73 | own programs us| 00003bf0 69 6e 67 20 4a 50 45 47 2e 0a 0a 54 68 65 20 63 |ing JPEG...The c| 00003c00 6f 6d 70 2e 67 72 61 70 68 69 63 73 2e 2a 20 46 |omp.graphics.* F| 00003c10 41 51 73 20 61 6e 64 20 74 68 65 20 61 6c 74 2e |AQs and the alt.| 00003c20 62 69 6e 61 72 69 65 73 2e 70 69 63 74 75 72 65 |binaries.picture| 00003c30 73 20 46 41 51 20 61 72 65 20 6d 6f 72 65 20 67 |s FAQ are more g| 00003c40 65 6e 65 72 61 6c 0a 73 6f 75 72 63 65 73 20 6f |eneral.sources o| 00003c50 66 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 |f information ab| 00003c60 6f 75 74 20 67 72 61 70 68 69 63 73 20 70 72 6f |out graphics pro| 00003c70 67 72 61 6d 73 20 61 76 61 69 6c 61 62 6c 65 20 |grams available | 00003c80 6f 6e 20 74 68 65 20 49 6e 74 65 72 6e 65 74 0a |on the Internet.| 00003c90 28 73 65 65 20 22 5b 32 30 5d 20 57 68 65 72 65 |(see "[20] Where| 00003ca0 20 61 72 65 20 46 41 51 20 6c 69 73 74 73 20 61 | are FAQ lists a| 00003cb0 72 63 68 69 76 65 64 3f 22 29 2e 0a 0a 2d 2d 2d |rchived?")...---| 00003cc0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00003cd0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 53 75 62 |-----------..Sub| 00003ce0 6a 65 63 74 3a 20 5b 37 5d 20 48 6f 77 20 64 6f |ject: [7] How do| 00003cf0 20 49 20 76 69 65 77 20 4a 50 45 47 20 69 6d 61 | I view JPEG ima| 00003d00 67 65 73 20 70 6f 73 74 65 64 20 6f 6e 20 55 73 |ges posted on Us| 00003d10 65 6e 65 74 3f 0a 0a 49 6d 61 67 65 20 66 69 6c |enet?..Image fil| 00003d20 65 73 20 70 6f 73 74 65 64 20 6f 6e 20 74 68 65 |es posted on the| 00003d30 20 61 6c 74 2e 62 69 6e 61 72 69 65 73 2e 70 69 | alt.binaries.pi| 00003d40 63 74 75 72 65 73 2e 2a 20 6e 65 77 73 67 72 6f |ctures.* newsgro| 00003d50 75 70 73 20 61 72 65 20 75 73 75 61 6c 6c 79 0a |ups are usually.| 00003d60 22 75 75 65 6e 63 6f 64 65 64 22 2e 20 20 55 75 |"uuencoded". Uu| 00003d70 65 6e 63 6f 64 69 6e 67 20 63 6f 6e 76 65 72 74 |encoding convert| 00003d80 73 20 62 69 6e 61 72 79 20 69 6d 61 67 65 20 64 |s binary image d| 00003d90 61 74 61 20 69 6e 74 6f 20 74 65 78 74 20 74 68 |ata into text th| 00003da0 61 74 20 63 61 6e 0a 73 61 66 65 6c 79 20 62 65 |at can.safely be| 00003db0 20 70 6f 73 74 65 64 2e 20 20 4d 6f 73 74 20 70 | posted. Most p| 00003dc0 6f 73 74 65 72 73 20 61 6c 73 6f 20 64 69 76 69 |osters also divi| 00003dd0 64 65 20 6c 61 72 67 65 20 70 6f 73 74 73 20 69 |de large posts i| 00003de0 6e 74 6f 20 6d 75 6c 74 69 70 6c 65 20 70 61 72 |nto multiple par| 00003df0 74 73 2c 0a 73 69 6e 63 65 20 73 6f 6d 65 20 6e |ts,.since some n| 00003e00 65 77 73 20 73 6f 66 74 77 61 72 65 20 63 61 6e |ews software can| 00003e10 27 74 20 63 6f 70 65 20 77 69 74 68 20 62 69 67 |'t cope with big| 00003e20 20 61 72 74 69 63 6c 65 73 2e 20 20 42 65 66 6f | articles. Befo| 00003e30 72 65 20 79 6f 75 72 20 76 69 65 77 65 72 0a 77 |re your viewer.w| 00003e40 69 6c 6c 20 72 65 63 6f 67 6e 69 7a 65 20 74 68 |ill recognize th| 00003e50 65 20 69 6d 61 67 65 2c 20 79 6f 75 20 6d 75 73 |e image, you mus| 00003e60 74 20 63 6f 6d 62 69 6e 65 20 74 68 65 20 70 61 |t combine the pa| 00003e70 72 74 73 20 69 6e 74 6f 20 6f 6e 65 20 66 69 6c |rts into one fil| 00003e80 65 20 61 6e 64 20 72 75 6e 0a 74 68 65 20 74 65 |e and run.the te| 00003e90 78 74 20 74 68 72 6f 75 67 68 20 61 20 75 75 64 |xt through a uud| 00003ea0 65 63 6f 64 65 20 70 72 6f 67 72 61 6d 2e 20 20 |ecode program. | 00003eb0 28 54 68 69 73 20 69 73 20 61 6c 6c 20 74 72 75 |(This is all tru| 00003ec0 65 20 66 6f 72 20 47 49 46 20 61 73 20 77 65 6c |e for GIF as wel| 00003ed0 6c 20 61 73 0a 4a 50 45 47 2c 20 62 79 20 74 68 |l as.JPEG, by th| 00003ee0 65 20 77 61 79 2e 29 20 20 54 68 65 72 65 20 61 |e way.) There a| 00003ef0 72 65 20 70 72 6f 67 72 61 6d 73 20 61 76 61 69 |re programs avai| 00003f00 6c 61 62 6c 65 20 74 6f 20 61 75 74 6f 6d 61 74 |lable to automat| 00003f10 65 20 74 68 69 73 20 70 72 6f 63 65 73 73 2e 0a |e this process..| 00003f20 0a 46 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 20 73 |.For more info s| 00003f30 65 65 20 74 68 65 20 61 6c 74 2e 62 69 6e 61 72 |ee the alt.binar| 00003f40 69 65 73 2e 70 69 63 74 75 72 65 73 20 46 41 51 |ies.pictures FAQ| 00003f50 2c 20 77 68 69 63 68 20 69 73 20 61 76 61 69 6c |, which is avail| 00003f60 61 62 6c 65 20 66 72 6f 6d 0a 72 74 66 6d 2e 6d |able from.rtfm.m| 00003f70 69 74 2e 65 64 75 3a 2f 70 75 62 2f 75 73 65 6e |it.edu:/pub/usen| 00003f80 65 74 2f 6e 65 77 73 2e 61 6e 73 77 65 72 73 2f |et/news.answers/| 00003f90 70 69 63 74 75 72 65 73 2d 66 61 71 2f 70 61 72 |pictures-faq/par| 00003fa0 74 5b 31 2d 33 5d 2c 20 6f 72 20 6f 6e 20 57 57 |t[1-3], or on WW| 00003fb0 57 20 61 74 0a 68 74 74 70 3a 2f 2f 77 77 77 2e |W at.http://www.| 00003fc0 63 69 73 2e 6f 68 69 6f 2d 73 74 61 74 65 2e 65 |cis.ohio-state.e| 00003fd0 64 75 2f 68 79 70 65 72 74 65 78 74 2f 66 61 71 |du/hypertext/faq| 00003fe0 2f 75 73 65 6e 65 74 2f 70 69 63 74 75 72 65 73 |/usenet/pictures| 00003ff0 2d 66 61 71 2f 74 6f 70 2e 68 74 6d 6c 0a 28 73 |-faq/top.html.(s| 00004000 65 65 20 61 6c 73 6f 20 22 5b 32 30 5d 20 57 68 |ee also "[20] Wh| 00004010 65 72 65 20 61 72 65 20 46 41 51 20 6c 69 73 74 |ere are FAQ list| 00004020 73 20 61 72 63 68 69 76 65 64 3f 22 29 2e 0a 0a |s archived?")...| 00004030 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00004040 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a |--------------..| 00004050 53 75 62 6a 65 63 74 3a 20 5b 38 5d 20 57 68 61 |Subject: [8] Wha| 00004060 74 20 69 73 20 63 6f 6c 6f 72 20 71 75 61 6e 74 |t is color quant| 00004070 69 7a 61 74 69 6f 6e 3f 0a 0a 4d 6f 73 74 20 70 |ization?..Most p| 00004080 65 6f 70 6c 65 20 64 6f 6e 27 74 20 68 61 76 65 |eople don't have| 00004090 20 66 75 6c 6c 2d 63 6f 6c 6f 72 20 28 32 34 20 | full-color (24 | 000040a0 62 69 74 20 70 65 72 20 70 69 78 65 6c 29 20 64 |bit per pixel) d| 000040b0 69 73 70 6c 61 79 20 68 61 72 64 77 61 72 65 2e |isplay hardware.| 000040c0 0a 54 79 70 69 63 61 6c 20 64 69 73 70 6c 61 79 |.Typical display| 000040d0 20 68 61 72 64 77 61 72 65 20 73 74 6f 72 65 73 | hardware stores| 000040e0 20 38 20 6f 72 20 66 65 77 65 72 20 62 69 74 73 | 8 or fewer bits| 000040f0 20 70 65 72 20 70 69 78 65 6c 2c 20 73 6f 20 69 | per pixel, so i| 00004100 74 20 63 61 6e 20 64 69 73 70 6c 61 79 0a 32 35 |t can display.25| 00004110 36 20 6f 72 20 66 65 77 65 72 20 64 69 73 74 69 |6 or fewer disti| 00004120 6e 63 74 20 63 6f 6c 6f 72 73 20 61 74 20 61 20 |nct colors at a | 00004130 74 69 6d 65 2e 20 20 54 6f 20 64 69 73 70 6c 61 |time. To displa| 00004140 79 20 61 20 66 75 6c 6c 2d 63 6f 6c 6f 72 20 69 |y a full-color i| 00004150 6d 61 67 65 2c 20 74 68 65 0a 63 6f 6d 70 75 74 |mage, the.comput| 00004160 65 72 20 6d 75 73 74 20 63 68 6f 6f 73 65 20 61 |er must choose a| 00004170 6e 20 61 70 70 72 6f 70 72 69 61 74 65 20 73 65 |n appropriate se| 00004180 74 20 6f 66 20 72 65 70 72 65 73 65 6e 74 61 74 |t of representat| 00004190 69 76 65 20 63 6f 6c 6f 72 73 20 61 6e 64 20 6d |ive colors and m| 000041a0 61 70 20 74 68 65 0a 69 6d 61 67 65 20 69 6e 74 |ap the.image int| 000041b0 6f 20 74 68 65 73 65 20 63 6f 6c 6f 72 73 2e 20 |o these colors. | 000041c0 20 54 68 69 73 20 70 72 6f 63 65 73 73 20 69 73 | This process is| 000041d0 20 63 61 6c 6c 65 64 20 22 63 6f 6c 6f 72 20 71 | called "color q| 000041e0 75 61 6e 74 69 7a 61 74 69 6f 6e 22 2e 0a 28 54 |uantization"..(T| 000041f0 68 69 73 20 69 73 20 73 6f 6d 65 74 68 69 6e 67 |his is something| 00004200 20 6f 66 20 61 20 6d 69 73 6e 6f 6d 65 72 3b 20 | of a misnomer; | 00004210 22 63 6f 6c 6f 72 20 73 65 6c 65 63 74 69 6f 6e |"color selection| 00004220 22 20 6f 72 20 22 63 6f 6c 6f 72 20 72 65 64 75 |" or "color redu| 00004230 63 74 69 6f 6e 22 0a 77 6f 75 6c 64 20 62 65 20 |ction".would be | 00004240 61 20 62 65 74 74 65 72 20 74 65 72 6d 2e 20 20 |a better term. | 00004250 42 75 74 20 77 65 27 72 65 20 73 74 75 63 6b 20 |But we're stuck | 00004260 77 69 74 68 20 74 68 65 20 73 74 61 6e 64 61 72 |with the standar| 00004270 64 20 75 73 61 67 65 2e 29 0a 0a 43 6c 65 61 72 |d usage.)..Clear| 00004280 6c 79 2c 20 63 6f 6c 6f 72 20 71 75 61 6e 74 69 |ly, color quanti| 00004290 7a 61 74 69 6f 6e 20 69 73 20 61 20 6c 6f 73 73 |zation is a loss| 000042a0 79 20 70 72 6f 63 65 73 73 2e 20 20 49 74 20 74 |y process. It t| 000042b0 75 72 6e 73 20 6f 75 74 20 74 68 61 74 20 66 6f |urns out that fo| 000042c0 72 20 6d 6f 73 74 0a 69 6d 61 67 65 73 2c 20 74 |r most.images, t| 000042d0 68 65 20 64 65 74 61 69 6c 73 20 6f 66 20 74 68 |he details of th| 000042e0 65 20 63 6f 6c 6f 72 20 71 75 61 6e 74 69 7a 61 |e color quantiza| 000042f0 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d 20 68 |tion algorithm h| 00004300 61 76 65 20 2a 6d 75 63 68 2a 20 6d 6f 72 65 0a |ave *much* more.| 00004310 69 6d 70 61 63 74 20 6f 6e 20 74 68 65 20 66 69 |impact on the fi| 00004320 6e 61 6c 20 69 6d 61 67 65 20 71 75 61 6c 69 74 |nal image qualit| 00004330 79 20 74 68 61 6e 20 64 6f 20 61 6e 79 20 65 72 |y than do any er| 00004340 72 6f 72 73 20 69 6e 74 72 6f 64 75 63 65 64 20 |rors introduced | 00004350 62 79 20 4a 50 45 47 0a 69 74 73 65 6c 66 20 28 |by JPEG.itself (| 00004360 65 78 63 65 70 74 20 61 74 20 74 68 65 20 76 65 |except at the ve| 00004370 72 79 20 6c 6f 77 65 73 74 20 4a 50 45 47 20 71 |ry lowest JPEG q| 00004380 75 61 6c 69 74 79 20 73 65 74 74 69 6e 67 73 29 |uality settings)| 00004390 2e 20 20 4d 61 6b 69 6e 67 20 61 20 67 6f 6f 64 |. Making a good| 000043a0 0a 63 6f 6c 6f 72 20 71 75 61 6e 74 69 7a 61 74 |.color quantizat| 000043b0 69 6f 6e 20 6d 65 74 68 6f 64 20 69 73 20 61 20 |ion method is a | 000043c0 62 6c 61 63 6b 20 61 72 74 2c 20 61 6e 64 20 6e |black art, and n| 000043d0 6f 20 73 69 6e 67 6c 65 20 61 6c 67 6f 72 69 74 |o single algorit| 000043e0 68 6d 20 69 73 20 62 65 73 74 0a 66 6f 72 20 61 |hm is best.for a| 000043f0 6c 6c 20 69 6d 61 67 65 73 2e 0a 0a 53 69 6e 63 |ll images...Sinc| 00004400 65 20 4a 50 45 47 20 69 73 20 61 20 66 75 6c 6c |e JPEG is a full| 00004410 2d 63 6f 6c 6f 72 20 66 6f 72 6d 61 74 2c 20 64 |-color format, d| 00004420 69 73 70 6c 61 79 69 6e 67 20 61 20 63 6f 6c 6f |isplaying a colo| 00004430 72 20 4a 50 45 47 20 69 6d 61 67 65 20 6f 6e 0a |r JPEG image on.| 00004440 38 2d 62 69 74 2d 6f 72 2d 6c 65 73 73 20 68 61 |8-bit-or-less ha| 00004450 72 64 77 61 72 65 20 72 65 71 75 69 72 65 73 20 |rdware requires | 00004460 63 6f 6c 6f 72 20 71 75 61 6e 74 69 7a 61 74 69 |color quantizati| 00004470 6f 6e 2e 20 20 54 68 65 20 73 70 65 65 64 20 61 |on. The speed a| 00004480 6e 64 20 69 6d 61 67 65 0a 71 75 61 6c 69 74 79 |nd image.quality| 00004490 20 6f 66 20 61 20 4a 50 45 47 20 76 69 65 77 65 | of a JPEG viewe| 000044a0 72 20 72 75 6e 6e 69 6e 67 20 6f 6e 20 73 75 63 |r running on suc| 000044b0 68 20 68 61 72 64 77 61 72 65 20 61 72 65 20 6c |h hardware are l| 000044c0 61 72 67 65 6c 79 20 64 65 74 65 72 6d 69 6e 65 |argely determine| 000044d0 64 20 62 79 0a 69 74 73 20 71 75 61 6e 74 69 7a |d by.its quantiz| 000044e0 61 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d 2e |ation algorithm.| 000044f0 20 20 44 65 70 65 6e 64 69 6e 67 20 6f 6e 20 77 | Depending on w| 00004500 68 65 74 68 65 72 20 61 20 71 75 69 63 6b 2d 61 |hether a quick-a| 00004510 6e 64 2d 64 69 72 74 79 20 6f 72 0a 67 6f 6f 64 |nd-dirty or.good| 00004520 2d 62 75 74 2d 73 6c 6f 77 20 6d 65 74 68 6f 64 |-but-slow method| 00004530 20 69 73 20 75 73 65 64 2c 20 79 6f 75 27 6c 6c | is used, you'll| 00004540 20 73 65 65 20 67 72 65 61 74 20 76 61 72 69 61 | see great varia| 00004550 74 69 6f 6e 20 69 6e 20 69 6d 61 67 65 20 71 75 |tion in image qu| 00004560 61 6c 69 74 79 0a 61 6d 6f 6e 67 20 76 69 65 77 |ality.among view| 00004570 65 72 73 20 6f 6e 20 38 2d 62 69 74 20 64 69 73 |ers on 8-bit dis| 00004580 70 6c 61 79 73 2c 20 6d 75 63 68 20 6d 6f 72 65 |plays, much more| 00004590 20 74 68 61 6e 20 6f 63 63 75 72 73 20 6f 6e 20 | than occurs on | 000045a0 32 34 2d 62 69 74 20 64 69 73 70 6c 61 79 73 2e |24-bit displays.| 000045b0 0a 0a 4f 6e 20 74 68 65 20 6f 74 68 65 72 20 68 |..On the other h| 000045c0 61 6e 64 2c 20 61 20 47 49 46 20 69 6d 61 67 65 |and, a GIF image| 000045d0 20 68 61 73 20 61 6c 72 65 61 64 79 20 62 65 65 | has already bee| 000045e0 6e 20 71 75 61 6e 74 69 7a 65 64 20 74 6f 20 32 |n quantized to 2| 000045f0 35 36 20 6f 72 20 66 65 77 65 72 0a 63 6f 6c 6f |56 or fewer.colo| 00004600 72 73 2e 20 20 28 41 20 47 49 46 20 61 6c 77 61 |rs. (A GIF alwa| 00004610 79 73 20 68 61 73 20 61 20 73 70 65 63 69 66 69 |ys has a specifi| 00004620 63 20 6e 75 6d 62 65 72 20 6f 66 20 63 6f 6c 6f |c number of colo| 00004630 72 73 20 69 6e 20 69 74 73 20 70 61 6c 65 74 74 |rs in its palett| 00004640 65 2c 20 61 6e 64 0a 74 68 65 20 66 6f 72 6d 61 |e, and.the forma| 00004650 74 20 64 6f 65 73 6e 27 74 20 61 6c 6c 6f 77 20 |t doesn't allow | 00004660 6d 6f 72 65 20 74 68 61 6e 20 32 35 36 20 70 61 |more than 256 pa| 00004670 6c 65 74 74 65 20 65 6e 74 72 69 65 73 2e 29 20 |lette entries.) | 00004680 20 47 49 46 20 68 61 73 20 74 68 65 0a 61 64 76 | GIF has the.adv| 00004690 61 6e 74 61 67 65 20 74 68 61 74 20 74 68 65 20 |antage that the | 000046a0 69 6d 61 67 65 20 6d 61 6b 65 72 20 70 72 65 63 |image maker prec| 000046b0 6f 6d 70 75 74 65 73 20 74 68 65 20 63 6f 6c 6f |omputes the colo| 000046c0 72 20 71 75 61 6e 74 69 7a 61 74 69 6f 6e 2c 20 |r quantization, | 000046d0 73 6f 0a 76 69 65 77 65 72 73 20 64 6f 6e 27 74 |so.viewers don't| 000046e0 20 68 61 76 65 20 74 6f 3b 20 74 68 69 73 20 69 | have to; this i| 000046f0 73 20 6f 6e 65 20 6f 66 20 74 68 65 20 74 68 69 |s one of the thi| 00004700 6e 67 73 20 74 68 61 74 20 6d 61 6b 65 20 47 49 |ngs that make GI| 00004710 46 20 76 69 65 77 65 72 73 0a 66 61 73 74 65 72 |F viewers.faster| 00004720 20 74 68 61 6e 20 4a 50 45 47 20 76 69 65 77 65 | than JPEG viewe| 00004730 72 73 2e 20 20 42 75 74 20 74 68 69 73 20 69 73 |rs. But this is| 00004740 20 61 6c 73 6f 20 74 68 65 20 2a 64 69 73 61 64 | also the *disad| 00004750 76 61 6e 74 61 67 65 2a 20 6f 66 20 47 49 46 3a |vantage* of GIF:| 00004760 0a 79 6f 75 27 72 65 20 73 74 75 63 6b 20 77 69 |.you're stuck wi| 00004770 74 68 20 74 68 65 20 69 6d 61 67 65 20 6d 61 6b |th the image mak| 00004780 65 72 27 73 20 71 75 61 6e 74 69 7a 61 74 69 6f |er's quantizatio| 00004790 6e 2e 20 20 49 66 20 74 68 65 20 6d 61 6b 65 72 |n. If the maker| 000047a0 20 71 75 61 6e 74 69 7a 65 64 20 74 6f 0a 61 20 | quantized to.a | 000047b0 64 69 66 66 65 72 65 6e 74 20 6e 75 6d 62 65 72 |different number| 000047c0 20 6f 66 20 63 6f 6c 6f 72 73 20 74 68 61 6e 20 | of colors than | 000047d0 77 68 61 74 20 79 6f 75 20 63 61 6e 20 64 69 73 |what you can dis| 000047e0 70 6c 61 79 2c 20 79 6f 75 27 6c 6c 20 65 69 74 |play, you'll eit| 000047f0 68 65 72 20 77 61 73 74 65 0a 64 69 73 70 6c 61 |her waste.displa| 00004800 79 20 63 61 70 61 62 69 6c 69 74 79 20 6f 72 20 |y capability or | 00004810 65 6c 73 65 20 68 61 76 65 20 74 6f 20 72 65 71 |else have to req| 00004820 75 61 6e 74 69 7a 65 20 74 6f 20 72 65 64 75 63 |uantize to reduc| 00004830 65 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 |e the number of | 00004840 63 6f 6c 6f 72 73 0a 28 77 68 69 63 68 20 75 73 |colors.(which us| 00004850 75 61 6c 6c 79 20 72 65 73 75 6c 74 73 20 69 6e |ually results in| 00004860 20 6d 75 63 68 20 70 6f 6f 72 65 72 20 69 6d 61 | much poorer ima| 00004870 67 65 20 71 75 61 6c 69 74 79 20 74 68 61 6e 20 |ge quality than | 00004880 71 75 61 6e 74 69 7a 69 6e 67 20 6f 6e 63 65 0a |quantizing once.| 00004890 66 72 6f 6d 20 61 20 66 75 6c 6c 2d 63 6f 6c 6f |from a full-colo| 000048a0 72 20 69 6d 61 67 65 29 2e 20 20 46 75 72 74 68 |r image). Furth| 000048b0 65 72 6d 6f 72 65 2c 20 69 66 20 74 68 65 20 6d |ermore, if the m| 000048c0 61 6b 65 72 20 64 69 64 6e 27 74 20 75 73 65 20 |aker didn't use | 000048d0 61 0a 68 69 67 68 2d 71 75 61 6c 69 74 79 20 63 |a.high-quality c| 000048e0 6f 6c 6f 72 20 71 75 61 6e 74 69 7a 61 74 69 6f |olor quantizatio| 000048f0 6e 20 61 6c 67 6f 72 69 74 68 6d 2c 20 79 6f 75 |n algorithm, you| 00004900 27 72 65 20 6f 75 74 20 6f 66 20 6c 75 63 6b 20 |'re out of luck | 00004910 2d 2d 2d 20 74 68 65 20 69 6d 61 67 65 0a 69 73 |--- the image.is| 00004920 20 72 75 69 6e 65 64 2e 0a 0a 46 6f 72 20 74 68 | ruined...For th| 00004930 69 73 20 72 65 61 73 6f 6e 2c 20 4a 50 45 47 20 |is reason, JPEG | 00004940 70 72 6f 6d 69 73 65 73 20 73 69 67 6e 69 66 69 |promises signifi| 00004950 63 61 6e 74 6c 79 20 62 65 74 74 65 72 20 69 6d |cantly better im| 00004960 61 67 65 20 71 75 61 6c 69 74 79 20 74 68 61 6e |age quality than| 00004970 20 47 49 46 0a 66 6f 72 20 61 6c 6c 20 75 73 65 | GIF.for all use| 00004980 72 73 20 77 68 6f 73 65 20 6d 61 63 68 69 6e 65 |rs whose machine| 00004990 73 20 64 6f 6e 27 74 20 6d 61 74 63 68 20 74 68 |s don't match th| 000049a0 65 20 69 6d 61 67 65 20 6d 61 6b 65 72 27 73 20 |e image maker's | 000049b0 64 69 73 70 6c 61 79 20 68 61 72 64 77 61 72 65 |display hardware| 000049c0 2e 0a 4a 50 45 47 27 73 20 66 75 6c 6c 20 63 6f |..JPEG's full co| 000049d0 6c 6f 72 20 69 6d 61 67 65 20 63 61 6e 20 62 65 |lor image can be| 000049e0 20 71 75 61 6e 74 69 7a 65 64 20 74 6f 20 70 72 | quantized to pr| 000049f0 65 63 69 73 65 6c 79 20 6d 61 74 63 68 20 74 68 |ecisely match th| 00004a00 65 20 76 69 65 77 65 72 27 73 0a 64 69 73 70 6c |e viewer's.displ| 00004a10 61 79 20 68 61 72 64 77 61 72 65 2e 20 20 46 75 |ay hardware. Fu| 00004a20 72 74 68 65 72 6d 6f 72 65 2c 20 79 6f 75 20 77 |rthermore, you w| 00004a30 69 6c 6c 20 62 65 20 61 62 6c 65 20 74 6f 20 74 |ill be able to t| 00004a40 61 6b 65 20 61 64 76 61 6e 74 61 67 65 20 6f 66 |ake advantage of| 00004a50 20 66 75 74 75 72 65 0a 69 6d 70 72 6f 76 65 6d | future.improvem| 00004a60 65 6e 74 73 20 69 6e 20 71 75 61 6e 74 69 7a 61 |ents in quantiza| 00004a70 74 69 6f 6e 20 61 6c 67 6f 72 69 74 68 6d 73 2c |tion algorithms,| 00004a80 20 6f 72 20 70 75 72 63 68 61 73 65 20 62 65 74 | or purchase bet| 00004a90 74 65 72 20 64 69 73 70 6c 61 79 0a 68 61 72 64 |ter display.hard| 00004aa0 77 61 72 65 2c 20 74 6f 20 67 65 74 20 61 20 62 |ware, to get a b| 00004ab0 65 74 74 65 72 20 76 69 65 77 20 6f 66 20 4a 50 |etter view of JP| 00004ac0 45 47 20 69 6d 61 67 65 73 20 79 6f 75 20 61 6c |EG images you al| 00004ad0 72 65 61 64 79 20 68 61 76 65 2e 20 20 57 69 74 |ready have. Wit| 00004ae0 68 20 61 20 47 49 46 2c 0a 79 6f 75 27 72 65 20 |h a GIF,.you're | 00004af0 73 74 75 63 6b 20 66 6f 72 65 76 65 72 6d 6f 72 |stuck forevermor| 00004b00 65 20 77 69 74 68 20 77 68 61 74 20 77 61 73 20 |e with what was | 00004b10 73 65 6e 74 2e 0a 0a 41 20 67 72 6f 77 69 6e 67 |sent...A growing| 00004b20 20 6e 75 6d 62 65 72 20 6f 66 20 70 65 6f 70 6c | number of peopl| 00004b30 65 20 68 61 76 65 20 62 65 74 74 65 72 2d 74 68 |e have better-th| 00004b40 61 6e 2d 38 2d 62 69 74 20 64 69 73 70 6c 61 79 |an-8-bit display| 00004b50 20 68 61 72 64 77 61 72 65 20 61 6c 72 65 61 64 | hardware alread| 00004b60 79 3a 0a 31 35 2d 62 69 74 20 22 68 69 2d 63 6f |y:.15-bit "hi-co| 00004b70 6c 6f 72 22 20 50 43 20 64 69 73 70 6c 61 79 73 |lor" PC displays| 00004b80 2c 20 74 72 75 65 20 32 34 2d 62 69 74 20 64 69 |, true 24-bit di| 00004b90 73 70 6c 61 79 73 20 6f 6e 20 77 6f 72 6b 73 74 |splays on workst| 00004ba0 61 74 69 6f 6e 73 20 61 6e 64 0a 4d 61 63 69 6e |ations and.Macin| 00004bb0 74 6f 73 68 65 73 2c 20 65 74 63 2e 20 20 46 6f |toshes, etc. Fo| 00004bc0 72 20 74 68 65 73 65 20 70 65 6f 70 6c 65 2c 20 |r these people, | 00004bd0 47 49 46 20 69 73 20 61 6c 72 65 61 64 79 20 6f |GIF is already o| 00004be0 62 73 6f 6c 65 74 65 2c 20 61 73 20 69 74 20 63 |bsolete, as it c| 00004bf0 61 6e 6e 6f 74 0a 72 65 70 72 65 73 65 6e 74 20 |annot.represent | 00004c00 61 6e 20 69 6d 61 67 65 20 74 6f 20 74 68 65 20 |an image to the | 00004c10 66 75 6c 6c 20 63 61 70 61 62 69 6c 69 74 69 65 |full capabilitie| 00004c20 73 20 6f 66 20 74 68 65 69 72 20 64 69 73 70 6c |s of their displ| 00004c30 61 79 2e 20 20 4a 50 45 47 20 69 6d 61 67 65 73 |ay. JPEG images| 00004c40 0a 63 61 6e 20 64 72 69 76 65 20 74 68 65 73 65 |.can drive these| 00004c50 20 64 69 73 70 6c 61 79 73 20 6d 75 63 68 20 6d | displays much m| 00004c60 6f 72 65 20 65 66 66 65 63 74 69 76 65 6c 79 2e |ore effectively.| 00004c70 0a 0a 49 6e 20 73 68 6f 72 74 2c 20 4a 50 45 47 |..In short, JPEG| 00004c80 20 69 73 20 61 6e 20 61 6c 6c 2d 61 72 6f 75 6e | is an all-aroun| 00004c90 64 20 62 65 74 74 65 72 20 63 68 6f 69 63 65 20 |d better choice | 00004ca0 74 68 61 6e 20 47 49 46 20 66 6f 72 20 72 65 70 |than GIF for rep| 00004cb0 72 65 73 65 6e 74 69 6e 67 0a 70 68 6f 74 6f 67 |resenting.photog| 00004cc0 72 61 70 68 69 63 20 69 6d 61 67 65 73 20 69 6e |raphic images in| 00004cd0 20 61 20 6d 61 63 68 69 6e 65 2d 69 6e 64 65 70 | a machine-indep| 00004ce0 65 6e 64 65 6e 74 20 66 61 73 68 69 6f 6e 2e 0a |endent fashion..| 00004cf0 0a 0a 49 74 27 73 20 73 6f 6d 65 74 69 6d 65 73 |..It's sometimes| 00004d00 20 74 68 6f 75 67 68 74 20 74 68 61 74 20 61 20 | thought that a | 00004d10 4a 50 45 47 20 63 6f 6e 76 65 72 74 65 64 20 66 |JPEG converted f| 00004d20 72 6f 6d 20 61 20 47 49 46 20 73 68 6f 75 6c 64 |rom a GIF should| 00004d30 6e 27 74 20 72 65 71 75 69 72 65 0a 63 6f 6c 6f |n't require.colo| 00004d40 72 20 71 75 61 6e 74 69 7a 61 74 69 6f 6e 2e 20 |r quantization. | 00004d50 20 54 68 69 73 20 69 73 20 66 61 6c 73 65 3a 20 | This is false: | 00004d60 65 76 65 6e 20 77 68 65 6e 20 79 6f 75 20 66 65 |even when you fe| 00004d70 65 64 20 61 20 32 35 36 2d 6f 72 2d 6c 65 73 73 |ed a 256-or-less| 00004d80 2d 63 6f 6c 6f 72 0a 47 49 46 20 69 6e 74 6f 20 |-color.GIF into | 00004d90 4a 50 45 47 2c 20 77 68 61 74 20 63 6f 6d 65 73 |JPEG, what comes| 00004da0 20 6f 75 74 20 6f 66 20 74 68 65 20 64 65 63 6f | out of the deco| 00004db0 6d 70 72 65 73 73 6f 72 20 69 73 20 6e 6f 74 20 |mpressor is not | 00004dc0 32 35 36 20 63 6f 6c 6f 72 73 2c 20 62 75 74 0a |256 colors, but.| 00004dd0 74 68 6f 75 73 61 6e 64 73 20 6f 66 20 63 6f 6c |thousands of col| 00004de0 6f 72 73 2e 20 20 54 68 69 73 20 68 61 70 70 65 |ors. This happe| 00004df0 6e 73 20 62 65 63 61 75 73 65 20 4a 50 45 47 27 |ns because JPEG'| 00004e00 73 20 6c 6f 73 73 69 6e 65 73 73 20 61 66 66 65 |s lossiness affe| 00004e10 63 74 73 20 65 61 63 68 0a 70 69 78 65 6c 20 61 |cts each.pixel a| 00004e20 20 6c 69 74 74 6c 65 20 64 69 66 66 65 72 65 6e | little differen| 00004e30 74 6c 79 2c 20 73 6f 20 74 77 6f 20 70 69 78 65 |tly, so two pixe| 00004e40 6c 73 20 74 68 61 74 20 73 74 61 72 74 65 64 20 |ls that started | 00004e50 77 69 74 68 20 69 64 65 6e 74 69 63 61 6c 20 63 |with identical c| 00004e60 6f 6c 6f 72 73 0a 77 69 6c 6c 20 75 73 75 61 6c |olors.will usual| 00004e70 6c 79 20 63 6f 6d 65 20 6f 75 74 20 77 69 74 68 |ly come out with| 00004e80 20 73 6c 69 67 68 74 6c 79 20 64 69 66 66 65 72 | slightly differ| 00004e90 65 6e 74 20 63 6f 6c 6f 72 73 2e 20 20 43 6f 6e |ent colors. Con| 00004ea0 73 69 64 65 72 69 6e 67 20 74 68 65 20 77 68 6f |sidering the who| 00004eb0 6c 65 0a 69 6d 61 67 65 2c 20 65 61 63 68 20 6f |le.image, each o| 00004ec0 72 69 67 69 6e 61 6c 20 63 6f 6c 6f 72 20 67 65 |riginal color ge| 00004ed0 74 73 20 22 73 6d 65 61 72 65 64 22 20 69 6e 74 |ts "smeared" int| 00004ee0 6f 20 61 20 67 72 6f 75 70 20 6f 66 20 6e 65 61 |o a group of nea| 00004ef0 72 62 79 20 63 6f 6c 6f 72 73 2e 0a 54 68 65 72 |rby colors..Ther| 00004f00 65 66 6f 72 65 20 71 75 61 6e 74 69 7a 61 74 69 |efore quantizati| 00004f10 6f 6e 20 69 73 20 61 6c 77 61 79 73 20 72 65 71 |on is always req| 00004f20 75 69 72 65 64 20 74 6f 20 64 69 73 70 6c 61 79 |uired to display| 00004f30 20 61 20 63 6f 6c 6f 72 20 4a 50 45 47 20 6f 6e | a color JPEG on| 00004f40 20 61 0a 63 6f 6c 6f 72 6d 61 70 70 65 64 20 64 | a.colormapped d| 00004f50 69 73 70 6c 61 79 2c 20 72 65 67 61 72 64 6c 65 |isplay, regardle| 00004f60 73 73 20 6f 66 20 74 68 65 20 69 6d 61 67 65 20 |ss of the image | 00004f70 73 6f 75 72 63 65 2e 0a 0a 54 68 65 20 73 61 6d |source...The sam| 00004f80 65 20 65 66 66 65 63 74 20 6d 61 6b 65 73 20 69 |e effect makes i| 00004f90 74 20 6e 65 61 72 6c 79 20 6d 65 61 6e 69 6e 67 |t nearly meaning| 00004fa0 6c 65 73 73 20 74 6f 20 74 61 6c 6b 20 61 62 6f |less to talk abo| 00004fb0 75 74 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 |ut the number of| 00004fc0 0a 63 6f 6c 6f 72 73 20 75 73 65 64 20 62 79 20 |.colors used by | 00004fd0 61 20 4a 50 45 47 20 69 6d 61 67 65 2e 20 20 45 |a JPEG image. E| 00004fe0 76 65 6e 20 69 66 20 79 6f 75 20 74 72 69 65 64 |ven if you tried| 00004ff0 20 74 6f 20 63 6f 75 6e 74 20 74 68 65 20 6e 75 | to count the nu| 00005000 6d 62 65 72 20 6f 66 0a 64 69 73 74 69 6e 63 74 |mber of.distinct| 00005010 20 70 69 78 65 6c 20 76 61 6c 75 65 73 2c 20 64 | pixel values, d| 00005020 69 66 66 65 72 65 6e 74 20 4a 50 45 47 20 64 65 |ifferent JPEG de| 00005030 63 6f 64 65 72 73 20 77 6f 75 6c 64 20 67 69 76 |coders would giv| 00005040 65 20 79 6f 75 20 64 69 66 66 65 72 65 6e 74 0a |e you different.| 00005050 72 65 73 75 6c 74 73 20 62 65 63 61 75 73 65 20 |results because | 00005060 6f 66 20 72 6f 75 6e 64 6f 66 66 20 65 72 72 6f |of roundoff erro| 00005070 72 20 64 69 66 66 65 72 65 6e 63 65 73 2e 20 20 |r differences. | 00005080 49 20 6f 63 63 61 73 69 6f 6e 61 6c 6c 79 20 73 |I occasionally s| 00005090 65 65 20 70 6f 73 74 65 64 0a 69 6d 61 67 65 73 |ee posted.images| 000050a0 20 64 65 73 63 72 69 62 65 64 20 61 73 20 22 32 | described as "2| 000050b0 35 36 2d 63 6f 6c 6f 72 20 4a 50 45 47 22 2e 20 |56-color JPEG". | 000050c0 20 54 68 69 73 20 74 65 6c 6c 73 20 6d 65 20 74 | This tells me t| 000050d0 68 61 74 20 74 68 65 20 70 6f 73 74 65 72 0a 28 |hat the poster.(| 000050e0 61 29 20 68 61 73 6e 27 74 20 72 65 61 64 20 74 |a) hasn't read t| 000050f0 68 69 73 20 46 41 51 20 61 6e 64 20 28 62 29 20 |his FAQ and (b) | 00005100 70 72 6f 62 61 62 6c 79 20 63 6f 6e 76 65 72 74 |probably convert| 00005110 65 64 20 74 68 65 20 4a 50 45 47 20 66 72 6f 6d |ed the JPEG from| 00005120 20 61 20 47 49 46 2e 0a 4a 50 45 47 73 20 63 61 | a GIF..JPEGs ca| 00005130 6e 20 62 65 20 63 6c 61 73 73 69 66 69 65 64 20 |n be classified | 00005140 61 73 20 63 6f 6c 6f 72 20 6f 72 20 67 72 61 79 |as color or gray| 00005150 2d 73 63 61 6c 65 2c 20 62 75 74 20 6e 75 6d 62 |-scale, but numb| 00005160 65 72 20 6f 66 20 63 6f 6c 6f 72 73 20 6a 75 73 |er of colors jus| 00005170 74 0a 69 73 6e 27 74 20 61 20 75 73 65 66 75 6c |t.isn't a useful| 00005180 20 63 6f 6e 63 65 70 74 20 66 6f 72 20 4a 50 45 | concept for JPE| 00005190 47 2c 20 61 6e 79 20 6d 6f 72 65 20 74 68 61 6e |G, any more than| 000051a0 20 69 74 20 69 73 20 66 6f 72 20 61 20 72 65 61 | it is for a rea| 000051b0 6c 20 70 68 6f 74 6f 67 72 61 70 68 2e 0a 0a 2d |l photograph...-| 000051c0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 000051d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 53 |-------------..S| 000051e0 75 62 6a 65 63 74 3a 20 5b 39 5d 20 57 68 61 74 |ubject: [9] What| 000051f0 20 61 72 65 20 73 6f 6d 65 20 72 75 6c 65 73 20 | are some rules | 00005200 6f 66 20 74 68 75 6d 62 20 66 6f 72 20 63 6f 6e |of thumb for con| 00005210 76 65 72 74 69 6e 67 20 47 49 46 20 69 6d 61 67 |verting GIF imag| 00005220 65 73 20 74 6f 20 4a 50 45 47 3f 0a 0a 43 6f 6e |es to JPEG?..Con| 00005230 76 65 72 74 69 6e 67 20 47 49 46 20 66 69 6c 65 |verting GIF file| 00005240 73 20 74 6f 20 4a 50 45 47 20 69 73 20 61 20 74 |s to JPEG is a t| 00005250 72 69 63 6b 79 20 62 75 73 69 6e 65 73 73 20 2d |ricky business -| 00005260 2d 2d 20 79 6f 75 20 61 72 65 20 70 69 6c 69 6e |-- you are pilin| 00005270 67 20 6f 6e 65 20 73 65 74 0a 6f 66 20 6c 69 6d |g one set.of lim| 00005280 69 74 61 74 69 6f 6e 73 20 61 74 6f 70 20 61 20 |itations atop a | 00005290 71 75 69 74 65 20 64 69 66 66 65 72 65 6e 74 20 |quite different | 000052a0 73 65 74 2c 20 61 6e 64 20 74 68 65 20 72 65 73 |set, and the res| 000052b0 75 6c 74 73 20 63 61 6e 20 62 65 20 61 77 66 75 |ults can be awfu| 000052c0 6c 2e 0a 43 65 72 74 61 69 6e 6c 79 20 61 20 4a |l..Certainly a J| 000052d0 50 45 47 20 6d 61 64 65 20 66 72 6f 6d 20 61 20 |PEG made from a | 000052e0 47 49 46 20 77 69 6c 6c 20 6e 65 76 65 72 20 62 |GIF will never b| 000052f0 65 20 61 73 20 67 6f 6f 64 20 61 73 20 61 20 4a |e as good as a J| 00005300 50 45 47 20 6d 61 64 65 20 66 72 6f 6d 0a 74 72 |PEG made from.tr| 00005310 75 65 20 32 34 2d 62 69 74 20 63 6f 6c 6f 72 20 |ue 24-bit color | 00005320 64 61 74 61 2e 20 20 42 75 74 20 69 66 20 77 68 |data. But if wh| 00005330 61 74 20 79 6f 75 27 76 65 20 67 6f 74 20 69 73 |at you've got is| 00005340 20 47 49 46 73 2c 20 61 6e 64 20 79 6f 75 20 6e | GIFs, and you n| 00005350 65 65 64 20 74 6f 0a 73 61 76 65 20 73 70 61 63 |eed to.save spac| 00005360 65 2c 20 68 65 72 65 20 61 72 65 20 73 6f 6d 65 |e, here are some| 00005370 20 68 69 6e 74 73 20 66 6f 72 20 67 65 74 74 69 | hints for getti| 00005380 6e 67 20 74 68 65 20 62 65 73 74 20 72 65 73 75 |ng the best resu| 00005390 6c 74 73 2e 0a 0a 57 69 74 68 20 63 61 72 65 20 |lts...With care | 000053a0 61 6e 64 20 61 20 63 6c 65 61 6e 20 73 6f 75 72 |and a clean sour| 000053b0 63 65 20 69 6d 61 67 65 2c 20 69 74 27 73 20 6f |ce image, it's o| 000053c0 66 74 65 6e 20 70 6f 73 73 69 62 6c 65 20 74 6f |ften possible to| 000053d0 20 6d 61 6b 65 20 61 20 4a 50 45 47 20 6f 66 0a | make a JPEG of.| 000053e0 71 75 61 6c 69 74 79 20 65 71 75 69 76 61 6c 65 |quality equivale| 000053f0 6e 74 20 74 6f 20 74 68 65 20 47 49 46 2e 20 20 |nt to the GIF. | 00005400 54 68 69 73 20 64 6f 65 73 20 6e 6f 74 20 6d 65 |This does not me| 00005410 61 6e 20 74 68 61 74 20 74 68 65 20 4a 50 45 47 |an that the JPEG| 00005420 20 6c 6f 6f 6b 73 0a 70 69 78 65 6c 2d 66 6f 72 | looks.pixel-for| 00005430 2d 70 69 78 65 6c 20 69 64 65 6e 74 69 63 61 6c |-pixel identical| 00005440 20 74 6f 20 74 68 65 20 47 49 46 20 2d 2d 2d 20 | to the GIF --- | 00005450 69 74 20 77 6f 6e 27 74 2e 20 20 45 73 70 65 63 |it won't. Espec| 00005460 69 61 6c 6c 79 20 6e 6f 74 20 6f 6e 20 61 6e 0a |ially not on an.| 00005470 38 2d 62 69 74 20 64 69 73 70 6c 61 79 2c 20 62 |8-bit display, b| 00005480 65 63 61 75 73 65 20 74 68 65 20 63 6f 6c 6f 72 |ecause the color| 00005490 20 71 75 61 6e 74 69 7a 61 74 69 6f 6e 20 70 72 | quantization pr| 000054a0 6f 63 65 73 73 20 75 73 65 64 20 74 6f 20 64 69 |ocess used to di| 000054b0 73 70 6c 61 79 20 74 68 65 0a 4a 50 45 47 20 70 |splay the.JPEG p| 000054c0 72 6f 62 61 62 6c 79 20 77 6f 6e 27 74 20 71 75 |robably won't qu| 000054d0 69 74 65 20 6d 61 74 63 68 20 74 68 65 20 71 75 |ite match the qu| 000054e0 61 6e 74 69 7a 61 74 69 6f 6e 20 70 72 6f 63 65 |antization proce| 000054f0 73 73 20 75 73 65 64 20 74 6f 20 6d 61 6b 65 20 |ss used to make | 00005500 74 68 65 0a 47 49 46 20 66 72 6f 6d 20 74 68 65 |the.GIF from the| 00005510 20 6f 72 69 67 69 6e 61 6c 20 64 61 74 61 20 28 | original data (| 00005520 73 65 65 20 22 5b 38 5d 20 57 68 61 74 20 69 73 |see "[8] What is| 00005530 20 63 6f 6c 6f 72 20 71 75 61 6e 74 69 7a 61 74 | color quantizat| 00005540 69 6f 6e 3f 22 29 2e 20 20 42 75 74 0a 72 65 6d |ion?"). But.rem| 00005550 65 6d 62 65 72 20 74 68 61 74 20 74 68 65 20 47 |ember that the G| 00005560 49 46 20 69 74 73 65 6c 66 20 69 73 20 6e 6f 74 |IF itself is not| 00005570 20 61 6c 6c 20 74 68 61 74 20 66 61 69 74 68 66 | all that faithf| 00005580 75 6c 20 74 6f 20 74 68 65 20 66 75 6c 6c 2d 63 |ul to the full-c| 00005590 6f 6c 6f 72 0a 6f 72 69 67 69 6e 61 6c 2c 20 69 |olor.original, i| 000055a0 66 20 79 6f 75 20 6c 6f 6f 6b 20 61 74 20 69 6e |f you look at in| 000055b0 64 69 76 69 64 75 61 6c 20 70 69 78 65 6c 73 2e |dividual pixels.| 000055c0 20 20 4c 6f 6f 6b 69 6e 67 20 61 74 20 74 68 65 | Looking at the| 000055d0 20 6f 76 65 72 61 6c 6c 20 69 6d 61 67 65 2c 0a | overall image,.| 000055e0 61 20 63 6f 6e 76 65 72 74 65 64 20 4a 50 45 47 |a converted JPEG| 000055f0 20 63 61 6e 20 6c 6f 6f 6b 20 61 73 20 67 6f 6f | can look as goo| 00005600 64 20 61 73 20 69 74 73 20 47 49 46 20 73 6f 75 |d as its GIF sou| 00005610 72 63 65 2e 20 20 53 6f 6d 65 20 70 65 6f 70 6c |rce. Some peopl| 00005620 65 20 63 6c 61 69 6d 20 74 68 61 74 0a 6f 6e 20 |e claim that.on | 00005630 32 34 2d 62 69 74 20 64 69 73 70 6c 61 79 73 2c |24-bit displays,| 00005640 20 61 20 63 61 72 65 66 75 6c 6c 79 20 63 6f 6e | a carefully con| 00005650 76 65 72 74 65 64 20 4a 50 45 47 20 63 61 6e 20 |verted JPEG can | 00005660 61 63 74 75 61 6c 6c 79 20 6c 6f 6f 6b 20 62 65 |actually look be| 00005670 74 74 65 72 20 74 68 61 6e 0a 74 68 65 20 47 49 |tter than.the GI| 00005680 46 20 73 6f 75 72 63 65 2c 20 62 65 63 61 75 73 |F source, becaus| 00005690 65 20 64 69 74 68 65 72 20 70 61 74 74 65 72 6e |e dither pattern| 000056a0 73 20 68 61 76 65 20 62 65 65 6e 20 65 6c 69 6d |s have been elim| 000056b0 69 6e 61 74 65 64 2e 20 20 28 4d 6f 72 65 20 61 |inated. (More a| 000056c0 62 6f 75 74 0a 64 69 74 68 65 72 69 6e 67 20 69 |bout.dithering i| 000056d0 6e 20 61 20 6d 6f 6d 65 6e 74 2e 29 0a 0a 4f 6e |n a moment.)..On| 000056e0 20 74 68 65 20 6f 74 68 65 72 20 68 61 6e 64 2c | the other hand,| 000056f0 20 4a 50 45 47 20 63 6f 6e 76 65 72 73 69 6f 6e | JPEG conversion| 00005700 20 61 62 73 6f 6c 75 74 65 6c 79 20 2a 77 69 6c | absolutely *wil| 00005710 6c 2a 20 64 65 67 72 61 64 65 20 61 6e 20 75 6e |l* degrade an un| 00005720 73 75 69 74 61 62 6c 65 0a 69 6d 61 67 65 20 6f |suitable.image o| 00005730 72 20 6f 6e 65 20 74 68 61 74 20 69 73 20 63 6f |r one that is co| 00005740 6e 76 65 72 74 65 64 20 63 61 72 65 6c 65 73 73 |nverted careless| 00005750 6c 79 2e 20 20 49 66 20 79 6f 75 20 61 72 65 20 |ly. If you are | 00005760 6e 6f 74 20 77 69 6c 6c 69 6e 67 20 74 6f 20 74 |not willing to t| 00005770 61 6b 65 0a 74 68 65 20 61 6d 6f 75 6e 74 20 6f |ake.the amount o| 00005780 66 20 74 72 6f 75 62 6c 65 20 73 75 67 67 65 73 |f trouble sugges| 00005790 74 65 64 20 62 65 6c 6f 77 2c 20 79 6f 75 27 72 |ted below, you'r| 000057a0 65 20 6d 75 63 68 20 62 65 74 74 65 72 20 6f 66 |e much better of| 000057b0 66 20 6c 65 61 76 69 6e 67 20 79 6f 75 72 0a 47 |f leaving your.G| 000057c0 49 46 20 69 6d 61 67 65 73 20 61 6c 6f 6e 65 2e |IF images alone.| 000057d0 20 20 53 69 6d 70 6c 79 20 63 72 61 6e 6b 69 6e | Simply crankin| 000057e0 67 20 74 68 65 20 4a 50 45 47 20 71 75 61 6c 69 |g the JPEG quali| 000057f0 74 79 20 73 65 74 74 69 6e 67 20 75 70 20 74 6f |ty setting up to| 00005800 20 61 20 76 65 72 79 0a 68 69 67 68 20 76 61 6c | a very.high val| 00005810 75 65 20 77 61 73 74 65 73 20 73 70 61 63 65 20 |ue wastes space | 00005820 28 77 68 69 63 68 20 64 65 66 65 61 74 73 20 74 |(which defeats t| 00005830 68 65 20 77 68 6f 6c 65 20 70 6f 69 6e 74 20 6f |he whole point o| 00005840 66 20 74 68 65 20 65 78 65 72 63 69 73 65 2c 20 |f the exercise, | 00005850 6e 6f 3f 29 0a 61 6e 64 20 73 6f 6d 65 20 69 6d |no?).and some im| 00005860 61 67 65 73 20 77 69 6c 6c 20 62 65 20 64 65 67 |ages will be deg| 00005870 72 61 64 65 64 20 61 6e 79 77 61 79 2e 0a 0a 54 |raded anyway...T| 00005880 68 65 20 66 69 72 73 74 20 72 75 6c 65 20 69 73 |he first rule is| 00005890 20 6e 65 76 65 72 20 74 6f 20 63 6f 6e 76 65 72 | never to conver| 000058a0 74 20 61 6e 20 69 6d 61 67 65 20 74 68 61 74 27 |t an image that'| 000058b0 73 20 6e 6f 74 20 61 70 70 72 6f 70 72 69 61 74 |s not appropriat| 000058c0 65 20 66 6f 72 20 4a 50 45 47 0a 28 73 65 65 20 |e for JPEG.(see | 000058d0 22 5b 33 5d 20 57 68 65 6e 20 73 68 6f 75 6c 64 |"[3] When should| 000058e0 20 49 20 75 73 65 20 4a 50 45 47 2c 20 61 6e 64 | I use JPEG, and| 000058f0 20 77 68 65 6e 20 73 68 6f 75 6c 64 20 49 20 73 | when should I s| 00005900 74 69 63 6b 20 77 69 74 68 20 47 49 46 3f 22 29 |tick with GIF?")| 00005910 2e 0a 4c 61 72 67 65 2c 20 68 69 67 68 2d 76 69 |..Large, high-vi| 00005920 73 75 61 6c 2d 71 75 61 6c 69 74 79 20 70 68 6f |sual-quality pho| 00005930 74 6f 67 72 61 70 68 69 63 20 69 6d 61 67 65 73 |tographic images| 00005940 20 61 72 65 20 75 73 75 61 6c 6c 79 20 74 68 65 | are usually the| 00005950 20 62 65 73 74 20 73 6f 75 72 63 65 0a 6d 61 74 | best source.mat| 00005960 65 72 69 61 6c 2e 20 20 41 6e 64 20 74 68 65 79 |erial. And they| 00005970 20 74 61 6b 65 20 75 70 20 6c 6f 74 73 20 6f 66 | take up lots of| 00005980 20 73 70 61 63 65 20 69 6e 20 47 49 46 20 66 6f | space in GIF fo| 00005990 72 6d 2c 20 73 6f 20 74 68 65 79 20 6f 66 66 65 |rm, so they offe| 000059a0 72 0a 73 69 67 6e 69 66 69 63 61 6e 74 20 70 6f |r.significant po| 000059b0 74 65 6e 74 69 61 6c 20 73 70 61 63 65 20 73 61 |tential space sa| 000059c0 76 69 6e 67 73 2e 20 20 28 41 20 67 6f 6f 64 20 |vings. (A good | 000059d0 72 75 6c 65 20 6f 66 20 74 68 75 6d 62 20 69 73 |rule of thumb is| 000059e0 20 6e 6f 74 20 74 6f 20 62 6f 74 68 65 72 0a 63 | not to bother.c| 000059f0 6f 6e 76 65 72 74 69 6e 67 20 61 6e 79 20 47 49 |onverting any GI| 00005a00 46 20 74 68 61 74 27 73 20 6d 75 63 68 20 75 6e |F that's much un| 00005a10 64 65 72 20 31 30 30 20 4b 62 79 74 65 73 3b 20 |der 100 Kbytes; | 00005a20 74 68 65 20 70 6f 74 65 6e 74 69 61 6c 20 73 61 |the potential sa| 00005a30 76 69 6e 67 73 20 69 73 6e 27 74 0a 77 6f 72 74 |vings isn't.wort| 00005a40 68 20 74 68 65 20 68 61 73 73 6c 65 2e 29 0a 0a |h the hassle.)..| 00005a50 54 68 65 20 73 65 63 6f 6e 64 20 72 75 6c 65 20 |The second rule | 00005a60 69 73 20 74 6f 20 6c 6f 6f 6b 20 61 74 20 65 61 |is to look at ea| 00005a70 63 68 20 4a 50 45 47 2c 20 74 6f 20 6d 61 6b 65 |ch JPEG, to make| 00005a80 20 73 75 72 65 20 79 6f 75 20 61 72 65 20 68 61 | sure you are ha| 00005a90 70 70 79 20 77 69 74 68 20 69 74 2c 0a 62 65 66 |ppy with it,.bef| 00005aa0 6f 72 65 20 74 68 72 6f 77 69 6e 67 20 61 77 61 |ore throwing awa| 00005ab0 79 20 74 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 |y the correspond| 00005ac0 69 6e 67 20 47 49 46 2e 20 20 54 68 69 73 20 77 |ing GIF. This w| 00005ad0 69 6c 6c 20 67 69 76 65 20 79 6f 75 20 61 20 63 |ill give you a c| 00005ae0 68 61 6e 63 65 20 74 6f 0a 72 65 2d 64 6f 20 74 |hance to.re-do t| 00005af0 68 65 20 63 6f 6e 76 65 72 73 69 6f 6e 20 77 69 |he conversion wi| 00005b00 74 68 20 61 20 68 69 67 68 65 72 20 71 75 61 6c |th a higher qual| 00005b10 69 74 79 20 73 65 74 74 69 6e 67 20 69 66 20 6e |ity setting if n| 00005b20 65 63 65 73 73 61 72 79 2e 20 20 41 6c 73 6f 0a |ecessary. Also.| 00005b30 63 6f 6d 70 61 72 65 20 74 68 65 20 66 69 6c 65 |compare the file| 00005b40 20 73 69 7a 65 73 20 2d 2d 2d 20 69 66 20 74 68 | sizes --- if th| 00005b50 65 20 69 6d 61 67 65 20 69 73 6e 27 74 20 73 75 |e image isn't su| 00005b60 69 74 61 62 6c 65 20 4a 50 45 47 20 6d 61 74 65 |itable JPEG mate| 00005b70 72 69 61 6c 2c 20 61 20 4a 50 45 47 0a 66 69 6c |rial, a JPEG.fil| 00005b80 65 20 6f 66 20 72 65 61 73 6f 6e 61 62 6c 65 20 |e of reasonable | 00005b90 71 75 61 6c 69 74 79 20 6d 61 79 20 63 6f 6d 65 |quality may come| 00005ba0 20 6f 75 74 20 2a 6c 61 72 67 65 72 2a 20 74 68 | out *larger* th| 00005bb0 61 6e 20 74 68 65 20 47 49 46 2e 0a 0a 54 68 65 |an the GIF...The| 00005bc0 20 74 68 69 72 64 20 72 75 6c 65 20 69 73 20 74 | third rule is t| 00005bd0 6f 20 67 65 74 20 72 69 64 20 6f 66 20 74 68 65 |o get rid of the| 00005be0 20 62 6f 72 64 65 72 2e 20 20 4d 61 6e 79 20 70 | border. Many p| 00005bf0 65 6f 70 6c 65 20 68 61 76 65 20 64 65 76 65 6c |eople have devel| 00005c00 6f 70 65 64 0a 61 6e 20 6f 64 64 20 68 61 62 69 |oped.an odd habi| 00005c10 74 20 6f 66 20 70 75 74 74 69 6e 67 20 61 20 6c |t of putting a l| 00005c20 61 72 67 65 20 73 69 6e 67 6c 65 2d 63 6f 6c 6f |arge single-colo| 00005c30 72 20 62 6f 72 64 65 72 20 61 72 6f 75 6e 64 20 |r border around | 00005c40 61 20 47 49 46 20 69 6d 61 67 65 2e 0a 57 68 69 |a GIF image..Whi| 00005c50 6c 65 20 75 73 65 6c 65 73 73 2c 20 74 68 69 73 |le useless, this| 00005c60 20 69 73 20 6e 65 61 72 6c 79 20 66 72 65 65 20 | is nearly free | 00005c70 69 6e 20 74 65 72 6d 73 20 6f 66 20 73 74 6f 72 |in terms of stor| 00005c80 61 67 65 20 63 6f 73 74 20 69 6e 20 47 49 46 20 |age cost in GIF | 00005c90 66 69 6c 65 73 2e 0a 49 74 20 69 73 20 2a 6e 6f |files..It is *no| 00005ca0 74 2a 20 66 72 65 65 20 69 6e 20 4a 50 45 47 20 |t* free in JPEG | 00005cb0 66 69 6c 65 73 2c 20 65 69 74 68 65 72 20 69 6e |files, either in| 00005cc0 20 73 74 6f 72 61 67 65 20 73 70 61 63 65 20 6f | storage space o| 00005cd0 72 20 69 6e 20 64 65 63 6f 64 69 6e 67 20 74 69 |r in decoding ti| 00005ce0 6d 65 2e 0a 57 6f 72 73 65 2c 20 74 68 65 20 73 |me..Worse, the s| 00005cf0 68 61 72 70 20 62 6f 72 64 65 72 20 62 6f 75 6e |harp border boun| 00005d00 64 61 72 79 20 63 61 6e 20 63 72 65 61 74 65 20 |dary can create | 00005d10 76 69 73 69 62 6c 65 20 61 72 74 69 66 61 63 74 |visible artifact| 00005d20 73 20 28 22 67 68 6f 73 74 22 20 65 64 67 65 73 |s ("ghost" edges| 00005d30 29 2e 0a 46 75 72 74 68 65 72 6d 6f 72 65 2c 20 |)..Furthermore, | 00005d40 77 68 65 6e 20 76 69 65 77 69 6e 67 20 61 20 62 |when viewing a b| 00005d50 6f 72 64 65 72 65 64 20 4a 50 45 47 20 6f 6e 20 |ordered JPEG on | 00005d60 61 6e 20 38 2d 62 69 74 20 64 69 73 70 6c 61 79 |an 8-bit display| 00005d70 2c 20 74 68 65 20 71 75 61 6e 74 69 7a 65 72 0a |, the quantizer.| 00005d80 77 69 6c 6c 20 74 68 69 6e 6b 20 74 68 65 20 62 |will think the b| 00005d90 6f 72 64 65 72 20 63 6f 6c 6f 72 20 69 73 20 69 |order color is i| 00005da0 6d 70 6f 72 74 61 6e 74 20 62 65 63 61 75 73 65 |mportant because| 00005db0 20 74 68 65 72 65 27 73 20 73 6f 20 6d 75 63 68 | there's so much| 00005dc0 20 6f 66 20 69 74 2c 20 61 6e 64 0a 68 65 6e 63 | of it, and.henc| 00005dd0 65 20 77 69 6c 6c 20 77 61 73 74 65 20 63 6f 6c |e will waste col| 00005de0 6f 72 20 70 61 6c 65 74 74 65 20 65 6e 74 72 69 |or palette entri| 00005df0 65 73 20 6f 6e 20 74 68 65 20 62 6f 72 64 65 72 |es on the border| 00005e00 2c 20 74 68 75 73 20 61 63 74 75 61 6c 6c 79 20 |, thus actually | 00005e10 72 65 64 75 63 69 6e 67 0a 74 68 65 20 64 69 73 |reducing.the dis| 00005e20 70 6c 61 79 65 64 20 71 75 61 6c 69 74 79 20 6f |played quality o| 00005e30 66 20 74 68 65 20 6d 61 69 6e 20 70 61 72 74 20 |f the main part | 00005e40 6f 66 20 74 68 65 20 69 6d 61 67 65 21 20 20 53 |of the image! S| 00005e50 6f 20 64 6f 20 79 6f 75 72 73 65 6c 66 20 61 20 |o do yourself a | 00005e60 66 61 76 6f 72 0a 61 6e 64 20 63 72 6f 70 20 6f |favor.and crop o| 00005e70 66 66 20 61 6e 79 20 62 6f 72 64 65 72 20 62 65 |ff any border be| 00005e80 66 6f 72 65 20 4a 50 45 47 69 6e 67 2e 0a 0a 54 |fore JPEGing...T| 00005e90 68 65 20 66 6f 75 72 74 68 20 72 75 6c 65 20 69 |he fourth rule i| 00005ea0 73 20 74 6f 20 6b 6e 6f 77 20 77 68 65 72 65 20 |s to know where | 00005eb0 74 68 65 20 69 6d 61 67 65 20 63 61 6d 65 20 66 |the image came f| 00005ec0 72 6f 6d 2e 20 20 52 65 70 65 61 74 65 64 20 47 |rom. Repeated G| 00005ed0 49 46 3c 3d 3e 4a 50 45 47 0a 63 6f 6e 76 65 72 |IF<=>JPEG.conver| 00005ee0 73 69 6f 6e 73 20 61 72 65 20 67 75 61 72 61 6e |sions are guaran| 00005ef0 74 65 65 64 20 74 6f 20 74 75 72 6e 20 61 6e 20 |teed to turn an | 00005f00 69 6d 61 67 65 20 69 6e 74 6f 20 6d 75 73 68 2c |image into mush,| 00005f10 20 62 65 63 61 75 73 65 20 79 6f 75 20 70 61 79 | because you pay| 00005f20 20 61 0a 71 75 61 6c 69 74 79 2d 6c 6f 73 73 20 | a.quality-loss | 00005f30 70 72 69 63 65 20 6f 6e 20 65 61 63 68 20 72 6f |price on each ro| 00005f40 75 6e 64 20 74 72 69 70 2e 20 20 44 6f 6e 27 74 |und trip. Don't| 00005f50 20 72 65 63 6f 6e 76 65 72 74 20 69 6d 61 67 65 | reconvert image| 00005f60 73 20 74 68 61 74 20 68 61 76 65 0a 62 65 65 6e |s that have.been| 00005f70 20 63 6f 6e 76 65 72 74 65 64 20 62 65 66 6f 72 | converted befor| 00005f80 65 2e 0a 0a 47 72 61 79 2d 73 63 61 6c 65 20 69 |e...Gray-scale i| 00005f90 6d 61 67 65 73 20 75 73 75 61 6c 6c 79 20 63 6f |mages usually co| 00005fa0 6e 76 65 72 74 20 77 69 74 68 6f 75 74 20 6d 75 |nvert without mu| 00005fb0 63 68 20 70 72 6f 62 6c 65 6d 2e 20 20 57 68 65 |ch problem. Whe| 00005fc0 6e 20 75 73 69 6e 67 20 63 6a 70 65 67 2c 0a 62 |n using cjpeg,.b| 00005fd0 65 20 73 75 72 65 20 74 6f 20 75 73 65 20 74 68 |e sure to use th| 00005fe0 65 20 2d 67 72 61 79 20 73 77 69 74 63 68 2e 20 |e -gray switch. | 00005ff0 20 28 4f 74 68 65 72 77 69 73 65 2c 20 63 6a 70 | (Otherwise, cjp| 00006000 65 67 20 74 72 65 61 74 73 20 61 20 47 49 46 20 |eg treats a GIF | 00006010 61 73 20 63 6f 6c 6f 72 0a 64 61 74 61 3b 20 74 |as color.data; t| 00006020 68 69 73 20 77 6f 72 6b 73 2c 20 62 75 74 20 69 |his works, but i| 00006030 74 20 77 61 73 74 65 73 20 73 70 61 63 65 20 61 |t wastes space a| 00006040 6e 64 20 74 69 6d 65 20 69 66 20 74 68 65 20 69 |nd time if the i| 00006050 6d 61 67 65 20 69 73 20 72 65 61 6c 6c 79 20 6f |mage is really o| 00006060 6e 6c 79 0a 67 72 61 79 2d 73 63 61 6c 65 2e 29 |nly.gray-scale.)| 00006070 20 20 51 75 61 6c 69 74 79 20 73 65 74 74 69 6e | Quality settin| 00006080 67 73 20 61 72 6f 75 6e 64 20 74 68 65 20 64 65 |gs around the de| 00006090 66 61 75 6c 74 20 28 37 35 29 20 61 72 65 20 75 |fault (75) are u| 000060a0 73 75 61 6c 6c 79 20 66 69 6e 65 2e 0a 0a 43 6f |sually fine...Co| 000060b0 6c 6f 72 20 69 6d 61 67 65 73 20 61 72 65 20 6d |lor images are m| 000060c0 75 63 68 20 74 72 69 63 6b 69 65 72 2e 20 20 43 |uch trickier. C| 000060d0 6f 6c 6f 72 20 47 49 46 73 20 6f 66 20 70 68 6f |olor GIFs of pho| 000060e0 74 6f 67 72 61 70 68 69 63 20 69 6d 61 67 65 73 |tographic images| 000060f0 20 61 72 65 0a 75 73 75 61 6c 6c 79 20 22 64 69 | are.usually "di| 00006100 74 68 65 72 65 64 22 20 74 6f 20 66 6f 6f 6c 20 |thered" to fool | 00006110 79 6f 75 72 20 65 79 65 20 69 6e 74 6f 20 73 65 |your eye into se| 00006120 65 69 6e 67 20 6d 6f 72 65 20 74 68 61 6e 20 74 |eing more than t| 00006130 68 65 20 32 35 36 20 63 6f 6c 6f 72 73 0a 74 68 |he 256 colors.th| 00006140 61 74 20 47 49 46 20 63 61 6e 20 61 63 74 75 61 |at GIF can actua| 00006150 6c 6c 79 20 73 74 6f 72 65 2e 20 20 49 66 20 79 |lly store. If y| 00006160 6f 75 20 65 6e 6c 61 72 67 65 20 74 68 65 20 69 |ou enlarge the i| 00006170 6d 61 67 65 2c 20 79 6f 75 20 77 69 6c 6c 20 66 |mage, you will f| 00006180 69 6e 64 20 74 68 61 74 0a 61 64 6a 61 63 65 6e |ind that.adjacen| 00006190 74 20 70 69 78 65 6c 73 20 61 72 65 20 6f 66 74 |t pixels are oft| 000061a0 65 6e 20 6f 66 20 73 69 67 6e 69 66 69 63 61 6e |en of significan| 000061b0 74 6c 79 20 64 69 66 66 65 72 65 6e 74 20 63 6f |tly different co| 000061c0 6c 6f 72 73 3b 20 61 74 20 6e 6f 72 6d 61 6c 20 |lors; at normal | 000061d0 73 69 7a 65 0a 74 68 65 20 65 79 65 20 61 76 65 |size.the eye ave| 000061e0 72 61 67 65 73 20 74 68 65 73 65 20 70 69 78 65 |rages these pixe| 000061f0 6c 73 20 74 6f 67 65 74 68 65 72 20 74 6f 20 70 |ls together to p| 00006200 72 6f 64 75 63 65 20 74 68 65 20 69 6c 6c 75 73 |roduce the illus| 00006210 69 6f 6e 20 6f 66 20 61 6e 0a 69 6e 74 65 72 6d |ion of an.interm| 00006220 65 64 69 61 74 65 20 63 6f 6c 6f 72 20 76 61 6c |ediate color val| 00006230 75 65 2e 20 20 54 68 65 20 74 72 6f 75 62 6c 65 |ue. The trouble| 00006240 20 77 69 74 68 20 64 69 74 68 65 72 69 6e 67 20 | with dithering | 00006250 69 73 20 74 68 61 74 2c 20 74 6f 20 4a 50 45 47 |is that, to JPEG| 00006260 2c 20 69 74 0a 6c 6f 6f 6b 73 20 6c 69 6b 65 20 |, it.looks like | 00006270 68 69 67 68 2d 73 70 61 74 69 61 6c 2d 66 72 65 |high-spatial-fre| 00006280 71 75 65 6e 63 79 20 63 6f 6c 6f 72 20 6e 6f 69 |quency color noi| 00006290 73 65 3b 20 61 6e 64 20 4a 50 45 47 20 63 61 6e |se; and JPEG can| 000062a0 27 74 20 63 6f 6d 70 72 65 73 73 20 6e 6f 69 73 |'t compress nois| 000062b0 65 0a 76 65 72 79 20 77 65 6c 6c 2e 20 20 54 68 |e.very well. Th| 000062c0 65 20 72 65 73 75 6c 74 69 6e 67 20 4a 50 45 47 |e resulting JPEG| 000062d0 20 66 69 6c 65 20 69 73 20 62 6f 74 68 20 6c 61 | file is both la| 000062e0 72 67 65 72 20 61 6e 64 20 6f 66 20 6c 6f 77 65 |rger and of lowe| 000062f0 72 20 69 6d 61 67 65 0a 71 75 61 6c 69 74 79 20 |r image.quality | 00006300 74 68 61 6e 20 77 68 61 74 20 79 6f 75 20 77 6f |than what you wo| 00006310 75 6c 64 20 68 61 76 65 20 67 6f 74 74 65 6e 20 |uld have gotten | 00006320 66 72 6f 6d 20 4a 50 45 47 69 6e 67 20 74 68 65 |from JPEGing the| 00006330 20 6f 72 69 67 69 6e 61 6c 20 66 75 6c 6c 20 63 | original full c| 00006340 6f 6c 6f 72 0a 69 6d 61 67 65 20 28 69 66 20 79 |olor.image (if y| 00006350 6f 75 20 68 61 64 20 69 74 29 2e 20 20 54 6f 20 |ou had it). To | 00006360 67 65 74 20 61 72 6f 75 6e 64 20 74 68 69 73 2c |get around this,| 00006370 20 79 6f 75 20 6e 65 65 64 20 74 6f 20 22 73 6d | you need to "sm| 00006380 6f 6f 74 68 22 20 74 68 65 20 47 49 46 0a 69 6d |ooth" the GIF.im| 00006390 61 67 65 20 62 65 66 6f 72 65 20 63 6f 6d 70 72 |age before compr| 000063a0 65 73 73 69 6f 6e 2e 20 20 53 6d 6f 6f 74 68 69 |ession. Smoothi| 000063b0 6e 67 20 61 76 65 72 61 67 65 73 20 74 6f 67 65 |ng averages toge| 000063c0 74 68 65 72 20 6e 65 61 72 62 79 20 70 69 78 65 |ther nearby pixe| 000063d0 6c 73 2c 20 74 68 75 73 0a 61 70 70 72 6f 78 69 |ls, thus.approxi| 000063e0 6d 61 74 69 6e 67 20 74 68 65 20 63 6f 6c 6f 72 |mating the color| 000063f0 20 74 68 61 74 20 79 6f 75 20 74 68 6f 75 67 68 | that you though| 00006400 74 20 79 6f 75 20 73 61 77 20 61 6e 79 77 61 79 |t you saw anyway| 00006410 2c 20 61 6e 64 20 69 6e 20 74 68 65 20 70 72 6f |, and in the pro| 00006420 63 65 73 73 0a 67 65 74 74 69 6e 67 20 72 69 64 |cess.getting rid| 00006430 20 6f 66 20 74 68 65 20 72 61 70 69 64 20 63 6f | of the rapid co| 00006440 6c 6f 72 20 63 68 61 6e 67 65 73 20 74 68 61 74 |lor changes that| 00006450 20 67 69 76 65 20 4a 50 45 47 20 74 72 6f 75 62 | give JPEG troub| 00006460 6c 65 2e 20 20 50 72 6f 70 65 72 20 75 73 65 0a |le. Proper use.| 00006470 6f 66 20 73 6d 6f 6f 74 68 69 6e 67 20 77 69 6c |of smoothing wil| 00006480 6c 20 62 6f 74 68 20 72 65 64 75 63 65 20 74 68 |l both reduce th| 00006490 65 20 73 69 7a 65 20 6f 66 20 74 68 65 20 63 6f |e size of the co| 000064a0 6d 70 72 65 73 73 65 64 20 66 69 6c 65 20 61 6e |mpressed file an| 000064b0 64 20 67 69 76 65 20 79 6f 75 20 61 0a 62 65 74 |d give you a.bet| 000064c0 74 65 72 2d 6c 6f 6f 6b 69 6e 67 20 6f 75 74 70 |ter-looking outp| 000064d0 75 74 20 69 6d 61 67 65 20 74 68 61 6e 20 79 6f |ut image than yo| 000064e0 75 27 64 20 67 65 74 20 77 69 74 68 6f 75 74 20 |u'd get without | 000064f0 73 6d 6f 6f 74 68 69 6e 67 2e 0a 0a 57 69 74 68 |smoothing...With| 00006500 20 74 68 65 20 49 4a 47 20 4a 50 45 47 20 73 6f | the IJG JPEG so| 00006510 66 74 77 61 72 65 20 28 63 6a 70 65 67 20 6f 72 |ftware (cjpeg or| 00006520 20 64 65 72 69 76 65 64 20 70 72 6f 67 72 61 6d | derived program| 00006530 73 29 2c 20 61 20 73 69 6d 70 6c 65 20 73 6d 6f |s), a simple smo| 00006540 6f 74 68 69 6e 67 0a 63 61 70 61 62 69 6c 69 74 |othing.capabilit| 00006550 79 20 69 73 20 62 75 69 6c 74 20 69 6e 2e 20 20 |y is built in. | 00006560 54 72 79 20 22 2d 73 6d 6f 6f 74 68 20 31 30 22 |Try "-smooth 10"| 00006570 20 6f 72 20 73 6f 20 77 68 65 6e 20 63 6f 6e 76 | or so when conv| 00006580 65 72 74 69 6e 67 20 47 49 46 73 2e 0a 56 61 6c |erting GIFs..Val| 00006590 75 65 73 20 6f 66 20 31 30 20 74 6f 20 32 35 20 |ues of 10 to 25 | 000065a0 73 65 65 6d 20 74 6f 20 77 6f 72 6b 20 77 65 6c |seem to work wel| 000065b0 6c 20 66 6f 72 20 68 69 67 68 2d 71 75 61 6c 69 |l for high-quali| 000065c0 74 79 20 47 49 46 73 2e 20 20 47 49 46 73 20 77 |ty GIFs. GIFs w| 000065d0 69 74 68 0a 68 65 61 76 79 2d 68 61 6e 64 65 64 |ith.heavy-handed| 000065e0 20 64 69 74 68 65 72 69 6e 67 20 6d 61 79 20 72 | dithering may r| 000065f0 65 71 75 69 72 65 20 6c 61 72 67 65 72 20 73 6d |equire larger sm| 00006600 6f 6f 74 68 69 6e 67 20 66 61 63 74 6f 72 73 2e |oothing factors.| 00006610 20 20 28 49 66 20 79 6f 75 20 63 61 6e 0a 73 65 | (If you can.se| 00006620 65 20 72 65 67 75 6c 61 72 20 66 69 6e 65 2d 73 |e regular fine-s| 00006630 63 61 6c 65 20 70 61 74 74 65 72 6e 73 20 6f 6e |cale patterns on| 00006640 20 74 68 65 20 47 49 46 20 69 6d 61 67 65 20 65 | the GIF image e| 00006650 76 65 6e 20 77 69 74 68 6f 75 74 20 65 6e 6c 61 |ven without enla| 00006660 72 67 65 6d 65 6e 74 2c 0a 74 68 65 6e 20 73 74 |rgement,.then st| 00006670 72 6f 6e 67 20 73 6d 6f 6f 74 68 69 6e 67 20 69 |rong smoothing i| 00006680 73 20 64 65 66 69 6e 69 74 65 6c 79 20 63 61 6c |s definitely cal| 00006690 6c 65 64 20 66 6f 72 2e 29 20 20 54 6f 6f 20 6c |led for.) Too l| 000066a0 61 72 67 65 20 61 20 73 6d 6f 6f 74 68 69 6e 67 |arge a smoothing| 000066b0 0a 66 61 63 74 6f 72 20 77 69 6c 6c 20 62 6c 75 |.factor will blu| 000066c0 72 20 74 68 65 20 6f 75 74 70 75 74 20 69 6d 61 |r the output ima| 000066d0 67 65 2c 20 77 68 69 63 68 20 79 6f 75 20 64 6f |ge, which you do| 000066e0 6e 27 74 20 77 61 6e 74 2e 20 20 49 66 20 79 6f |n't want. If yo| 000066f0 75 20 61 72 65 20 61 6e 0a 69 6d 61 67 65 20 70 |u are an.image p| 00006700 72 6f 63 65 73 73 69 6e 67 20 77 69 7a 61 72 64 |rocessing wizard| 00006710 2c 20 79 6f 75 20 63 61 6e 20 61 6c 73 6f 20 64 |, you can also d| 00006720 6f 20 73 6d 6f 6f 74 68 69 6e 67 20 77 69 74 68 |o smoothing with| 00006730 20 61 20 73 65 70 61 72 61 74 65 20 66 69 6c 74 | a separate filt| 00006740 65 72 69 6e 67 0a 70 72 6f 67 72 61 6d 2c 20 62 |ering.program, b| 00006750 75 74 20 61 70 70 72 6f 70 72 69 61 74 65 20 75 |ut appropriate u| 00006760 73 65 20 6f 66 20 73 75 63 68 20 74 6f 6f 6c 73 |se of such tools| 00006770 20 69 73 20 62 65 79 6f 6e 64 20 74 68 65 20 73 | is beyond the s| 00006780 63 6f 70 65 20 6f 66 20 74 68 69 73 20 46 41 51 |cope of this FAQ| 00006790 2e 0a 0a 51 75 61 6c 69 74 79 20 73 65 74 74 69 |...Quality setti| 000067a0 6e 67 73 20 61 72 6f 75 6e 64 20 38 35 20 28 61 |ngs around 85 (a| 000067b0 20 62 69 74 20 68 69 67 68 65 72 20 74 68 61 6e | bit higher than| 000067c0 20 64 65 66 61 75 6c 74 29 20 75 73 75 61 6c 6c | default) usuall| 000067d0 79 20 77 6f 72 6b 20 77 65 6c 6c 0a 77 68 65 6e |y work well.when| 000067e0 20 63 6f 6e 76 65 72 74 69 6e 67 20 63 6f 6c 6f | converting colo| 000067f0 72 20 47 49 46 73 2c 20 61 73 73 75 6d 69 6e 67 |r GIFs, assuming| 00006800 20 74 68 61 74 20 79 6f 75 27 76 65 20 70 69 63 | that you've pic| 00006810 6b 65 64 20 61 20 67 6f 6f 64 20 73 6d 6f 6f 74 |ked a good smoot| 00006820 68 69 6e 67 0a 66 61 63 74 6f 72 2e 20 20 59 6f |hing.factor. Yo| 00006830 75 20 6d 61 79 20 6e 65 65 64 20 73 74 69 6c 6c |u may need still| 00006840 20 68 69 67 68 65 72 20 71 75 61 6c 69 74 79 20 | higher quality | 00006850 73 65 74 74 69 6e 67 73 20 69 66 20 79 6f 75 20 |settings if you | 00006860 63 61 6e 27 74 20 68 69 64 65 20 74 68 65 0a 64 |can't hide the.d| 00006870 69 74 68 65 72 69 6e 67 20 70 61 74 74 65 72 6e |ithering pattern| 00006880 20 77 69 74 68 20 61 20 72 65 61 73 6f 6e 61 62 | with a reasonab| 00006890 6c 65 20 73 6d 6f 6f 74 68 69 6e 67 20 66 61 63 |le smoothing fac| 000068a0 74 6f 72 2e 20 20 52 65 61 6c 6c 79 20 62 61 64 |tor. Really bad| 000068b0 6c 79 20 64 69 74 68 65 72 65 64 0a 47 49 46 73 |ly dithered.GIFs| 000068c0 20 61 72 65 20 62 65 73 74 20 6c 65 66 74 20 61 | are best left a| 000068d0 73 20 47 49 46 73 2e 0a 0a 44 6f 6e 27 74 20 65 |s GIFs...Don't e| 000068e0 78 70 65 63 74 20 4a 50 45 47 20 66 69 6c 65 73 |xpect JPEG files| 000068f0 20 63 6f 6e 76 65 72 74 65 64 20 66 72 6f 6d 20 | converted from | 00006900 47 49 46 73 20 74 6f 20 62 65 20 61 73 20 73 6d |GIFs to be as sm| 00006910 61 6c 6c 20 61 73 20 74 68 6f 73 65 20 63 72 65 |all as those cre| 00006920 61 74 65 64 0a 64 69 72 65 63 74 6c 79 20 66 72 |ated.directly fr| 00006930 6f 6d 20 66 75 6c 6c 2d 63 6f 6c 6f 72 20 6f 72 |om full-color or| 00006940 69 67 69 6e 61 6c 73 2e 20 20 54 68 65 20 64 69 |iginals. The di| 00006950 74 68 65 72 69 6e 67 20 6e 6f 69 73 65 20 77 61 |thering noise wa| 00006960 73 74 65 73 20 73 70 61 63 65 2c 20 62 75 74 0a |stes space, but.| 00006970 79 6f 75 20 77 6f 6e 27 74 20 62 65 20 61 62 6c |you won't be abl| 00006980 65 20 74 6f 20 73 6d 6f 6f 74 68 20 61 77 61 79 |e to smooth away| 00006990 20 61 6c 6c 20 74 68 65 20 6e 6f 69 73 65 20 77 | all the noise w| 000069a0 69 74 68 6f 75 74 20 62 6c 75 72 72 69 6e 67 20 |ithout blurring | 000069b0 74 68 65 20 69 6d 61 67 65 2e 0a 54 79 70 69 63 |the image..Typic| 000069c0 61 6c 6c 79 2c 20 61 20 67 6f 6f 64 2d 71 75 61 |ally, a good-qua| 000069d0 6c 69 74 79 20 63 6f 6e 76 65 72 74 65 64 20 4a |lity converted J| 000069e0 50 45 47 20 77 69 6c 6c 20 62 65 20 6f 6e 65 2d |PEG will be one-| 000069f0 68 61 6c 66 20 74 6f 20 6f 6e 65 2d 74 68 69 72 |half to one-thir| 00006a00 64 20 74 68 65 0a 73 69 7a 65 20 6f 66 20 74 68 |d the.size of th| 00006a10 65 20 47 49 46 20 66 69 6c 65 2c 20 6e 6f 74 20 |e GIF file, not | 00006a20 6f 6e 65 2d 66 6f 75 72 74 68 20 61 73 20 73 75 |one-fourth as su| 00006a30 67 67 65 73 74 65 64 20 69 6e 20 73 65 63 74 69 |ggested in secti| 00006a40 6f 6e 20 34 2e 20 20 49 66 20 74 68 65 20 4a 50 |on 4. If the JP| 00006a50 45 47 0a 63 6f 6d 65 73 20 6f 75 74 20 6d 75 63 |EG.comes out muc| 00006a60 68 20 6d 6f 72 65 20 74 68 61 6e 20 68 61 6c 66 |h more than half| 00006a70 20 74 68 65 20 73 69 7a 65 20 6f 66 20 74 68 65 | the size of the| 00006a80 20 47 49 46 2c 20 74 68 69 73 20 69 73 20 61 20 | GIF, this is a | 00006a90 67 6f 6f 64 20 73 69 67 6e 20 74 68 61 74 0a 74 |good sign that.t| 00006aa0 68 65 20 69 6d 61 67 65 20 73 68 6f 75 6c 64 6e |he image shouldn| 00006ab0 27 74 20 62 65 20 63 6f 6e 76 65 72 74 65 64 20 |'t be converted | 00006ac0 61 74 20 61 6c 6c 2e 0a 0a 54 68 65 20 75 70 73 |at all...The ups| 00006ad0 68 6f 74 20 6f 66 20 61 6c 6c 20 74 68 69 73 20 |hot of all this | 00006ae0 69 73 20 74 68 61 74 20 22 63 6a 70 65 67 20 2d |is that "cjpeg -| 00006af0 71 75 61 6c 69 74 79 20 38 35 20 2d 73 6d 6f 6f |quality 85 -smoo| 00006b00 74 68 20 31 30 22 20 69 73 20 70 72 6f 62 61 62 |th 10" is probab| 00006b10 6c 79 20 61 0a 67 6f 6f 64 20 73 74 61 72 74 69 |ly a.good starti| 00006b20 6e 67 20 70 6f 69 6e 74 20 66 6f 72 20 63 6f 6e |ng point for con| 00006b30 76 65 72 74 69 6e 67 20 63 6f 6c 6f 72 20 47 49 |verting color GI| 00006b40 46 73 2e 20 20 42 75 74 20 69 66 20 79 6f 75 20 |Fs. But if you | 00006b50 63 61 72 65 20 61 62 6f 75 74 20 74 68 65 0a 69 |care about the.i| 00006b60 6d 61 67 65 2c 20 79 6f 75 27 6c 6c 20 77 61 6e |mage, you'll wan| 00006b70 74 20 74 6f 20 63 68 65 63 6b 20 74 68 65 20 72 |t to check the r| 00006b80 65 73 75 6c 74 73 20 61 6e 64 20 6d 61 79 62 65 |esults and maybe| 00006b90 20 74 72 79 20 61 20 66 65 77 20 6f 74 68 65 72 | try a few other| 00006ba0 20 73 65 74 74 69 6e 67 73 2e 0a 42 6c 69 6e 64 | settings..Blind| 00006bb0 6c 79 20 63 6f 6e 76 65 72 74 69 6e 67 20 61 20 |ly converting a | 00006bc0 6c 61 72 67 65 20 47 49 46 20 6c 69 62 72 61 72 |large GIF librar| 00006bd0 79 20 61 74 20 74 68 69 73 20 6f 72 20 61 6e 79 |y at this or any| 00006be0 20 6f 74 68 65 72 20 73 65 74 74 69 6e 67 20 69 | other setting i| 00006bf0 73 20 61 0a 72 65 63 69 70 65 20 66 6f 72 20 64 |s a.recipe for d| 00006c00 69 73 61 73 74 65 72 2e 0a 0a 2d 2d 2d 2d 2d 2d |isaster...------| 00006c10 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00006c20 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 53 75 62 6a 65 63 |--------..Subjec| 00006c30 74 3a 20 5b 31 30 5d 20 44 6f 65 73 20 6c 6f 73 |t: [10] Does los| 00006c40 73 20 61 63 63 75 6d 75 6c 61 74 65 20 77 69 74 |s accumulate wit| 00006c50 68 20 72 65 70 65 61 74 65 64 20 63 6f 6d 70 72 |h repeated compr| 00006c60 65 73 73 69 6f 6e 2f 64 65 63 6f 6d 70 72 65 73 |ession/decompres| 00006c70 73 69 6f 6e 3f 0a 0a 49 74 20 77 6f 75 6c 64 20 |sion?..It would | 00006c80 62 65 20 6e 69 63 65 20 69 66 2c 20 68 61 76 69 |be nice if, havi| 00006c90 6e 67 20 63 6f 6d 70 72 65 73 73 65 64 20 61 6e |ng compressed an| 00006ca0 20 69 6d 61 67 65 20 77 69 74 68 20 4a 50 45 47 | image with JPEG| 00006cb0 2c 20 79 6f 75 20 63 6f 75 6c 64 0a 64 65 63 6f |, you could.deco| 00006cc0 6d 70 72 65 73 73 20 69 74 2c 20 6d 61 6e 69 70 |mpress it, manip| 00006cd0 75 6c 61 74 65 20 69 74 20 28 63 72 6f 70 20 6f |ulate it (crop o| 00006ce0 66 66 20 61 20 62 6f 72 64 65 72 2c 20 73 61 79 |ff a border, say| 00006cf0 29 2c 20 61 6e 64 20 72 65 63 6f 6d 70 72 65 73 |), and recompres| 00006d00 73 20 69 74 0a 77 69 74 68 6f 75 74 20 61 6e 79 |s it.without any| 00006d10 20 66 75 72 74 68 65 72 20 69 6d 61 67 65 20 64 | further image d| 00006d20 65 67 72 61 64 61 74 69 6f 6e 20 62 65 79 6f 6e |egradation beyon| 00006d30 64 20 77 68 61 74 20 79 6f 75 20 6c 6f 73 74 20 |d what you lost | 00006d40 69 6e 69 74 69 61 6c 6c 79 2e 0a 55 6e 66 6f 72 |initially..Unfor| 00006d50 74 75 6e 61 74 65 6c 79 20 54 48 49 53 20 49 53 |tunately THIS IS| 00006d60 20 4e 4f 54 20 54 48 45 20 43 41 53 45 2e 20 20 | NOT THE CASE. | 00006d70 49 6e 20 67 65 6e 65 72 61 6c 2c 20 72 65 63 6f |In general, reco| 00006d80 6d 70 72 65 73 73 69 6e 67 20 61 6e 20 61 6c 74 |mpressing an alt| 00006d90 65 72 65 64 0a 69 6d 61 67 65 20 6c 6f 73 65 73 |ered.image loses| 00006da0 20 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 74 69 6f | more informatio| 00006db0 6e 2e 20 20 48 65 6e 63 65 20 69 74 27 73 20 69 |n. Hence it's i| 00006dc0 6d 70 6f 72 74 61 6e 74 20 74 6f 20 6d 69 6e 69 |mportant to mini| 00006dd0 6d 69 7a 65 20 74 68 65 20 6e 75 6d 62 65 72 0a |mize the number.| 00006de0 6f 66 20 67 65 6e 65 72 61 74 69 6f 6e 73 20 6f |of generations o| 00006df0 66 20 4a 50 45 47 20 63 6f 6d 70 72 65 73 73 69 |f JPEG compressi| 00006e00 6f 6e 20 62 65 74 77 65 65 6e 20 69 6e 69 74 69 |on between initi| 00006e10 61 6c 20 61 6e 64 20 66 69 6e 61 6c 20 76 65 72 |al and final ver| 00006e20 73 69 6f 6e 73 20 6f 66 20 61 6e 0a 69 6d 61 67 |sions of an.imag| 00006e30 65 2e 0a 0a 49 74 20 74 75 72 6e 73 20 6f 75 74 |e...It turns out| 00006e40 20 74 68 61 74 20 69 66 20 79 6f 75 20 64 65 63 | that if you dec| 00006e50 6f 6d 70 72 65 73 73 20 61 6e 64 20 72 65 63 6f |ompress and reco| 00006e60 6d 70 72 65 73 73 20 61 6e 20 69 6d 61 67 65 20 |mpress an image | 00006e70 61 74 20 74 68 65 20 73 61 6d 65 0a 71 75 61 6c |at the same.qual| 00006e80 69 74 79 20 73 65 74 74 69 6e 67 20 66 69 72 73 |ity setting firs| 00006e90 74 20 75 73 65 64 2c 20 6c 69 74 74 6c 65 20 6f |t used, little o| 00006ea0 72 20 6e 6f 20 66 75 72 74 68 65 72 20 64 65 67 |r no further deg| 00006eb0 72 61 64 61 74 69 6f 6e 20 6f 63 63 75 72 73 2e |radation occurs.| 00006ec0 20 20 54 68 69 73 0a 6d 65 61 6e 73 20 74 68 61 | This.means tha| 00006ed0 74 20 79 6f 75 20 63 61 6e 20 6d 61 6b 65 20 6c |t you can make l| 00006ee0 6f 63 61 6c 20 6d 6f 64 69 66 69 63 61 74 69 6f |ocal modificatio| 00006ef0 6e 73 20 74 6f 20 61 20 4a 50 45 47 20 69 6d 61 |ns to a JPEG ima| 00006f00 67 65 20 77 69 74 68 6f 75 74 20 6d 61 74 65 72 |ge without mater| 00006f10 69 61 6c 0a 64 65 67 72 61 64 61 74 69 6f 6e 20 |ial.degradation | 00006f20 6f 66 20 6f 74 68 65 72 20 61 72 65 61 73 20 6f |of other areas o| 00006f30 66 20 74 68 65 20 69 6d 61 67 65 2e 20 20 54 68 |f the image. Th| 00006f40 65 20 61 72 65 61 73 20 79 6f 75 20 63 68 61 6e |e areas you chan| 00006f50 67 65 20 77 69 6c 6c 20 64 65 67 72 61 64 65 2c |ge will degrade,| 00006f60 0a 68 6f 77 65 76 65 72 2e 20 20 43 6f 75 6e 74 |.however. Count| 00006f70 65 72 69 6e 74 75 69 74 69 76 65 6c 79 2c 20 74 |erintuitively, t| 00006f80 68 69 73 20 77 6f 72 6b 73 20 62 65 74 74 65 72 |his works better| 00006f90 20 74 68 65 20 6c 6f 77 65 72 20 74 68 65 20 71 | the lower the q| 00006fa0 75 61 6c 69 74 79 0a 73 65 74 74 69 6e 67 2e 20 |uality.setting. | 00006fb0 20 42 75 74 20 79 6f 75 20 6d 75 73 74 20 75 73 | But you must us| 00006fc0 65 20 2a 65 78 61 63 74 6c 79 2a 20 74 68 65 20 |e *exactly* the | 00006fd0 73 61 6d 65 20 73 65 74 74 69 6e 67 2c 20 6f 72 |same setting, or| 00006fe0 20 61 6c 6c 20 62 65 74 73 20 61 72 65 20 6f 66 | all bets are of| 00006ff0 66 2e 0a 41 6c 73 6f 2c 20 74 68 65 20 64 65 63 |f..Also, the dec| 00007000 6f 6d 70 72 65 73 73 65 64 20 69 6d 61 67 65 20 |ompressed image | 00007010 6d 75 73 74 20 62 65 20 73 61 76 65 64 20 69 6e |must be saved in| 00007020 20 61 20 66 75 6c 6c 2d 63 6f 6c 6f 72 20 66 6f | a full-color fo| 00007030 72 6d 61 74 3b 20 69 66 20 79 6f 75 20 64 6f 0a |rmat; if you do.| 00007040 4a 50 45 47 3d 3e 47 49 46 3d 3e 4a 50 45 47 2c |JPEG=>GIF=>JPEG,| 00007050 20 74 68 65 20 63 6f 6c 6f 72 20 71 75 61 6e 74 | the color quant| 00007060 69 7a 61 74 69 6f 6e 20 73 74 65 70 20 6c 6f 73 |ization step los| 00007070 65 73 20 6c 6f 74 73 20 6f 66 20 69 6e 66 6f 72 |es lots of infor| 00007080 6d 61 74 69 6f 6e 2e 0a 0a 55 6e 66 6f 72 74 75 |mation...Unfortu| 00007090 6e 61 74 65 6c 79 2c 20 63 72 6f 70 70 69 6e 67 |nately, cropping| 000070a0 20 64 6f 65 73 6e 27 74 20 63 6f 75 6e 74 20 61 | doesn't count a| 000070b0 73 20 61 20 6c 6f 63 61 6c 20 63 68 61 6e 67 65 |s a local change| 000070c0 21 20 20 4a 50 45 47 20 70 72 6f 63 65 73 73 65 |! JPEG processe| 000070d0 73 0a 74 68 65 20 69 6d 61 67 65 20 69 6e 20 73 |s.the image in s| 000070e0 6d 61 6c 6c 20 62 6c 6f 63 6b 73 2c 20 61 6e 64 |mall blocks, and| 000070f0 20 63 72 6f 70 70 69 6e 67 20 75 73 75 61 6c 6c | cropping usuall| 00007100 79 20 6d 6f 76 65 73 20 74 68 65 20 62 6c 6f 63 |y moves the bloc| 00007110 6b 20 62 6f 75 6e 64 61 72 69 65 73 2c 0a 73 6f |k boundaries,.so| 00007120 20 74 68 61 74 20 74 68 65 20 69 6d 61 67 65 20 | that the image | 00007130 6c 6f 6f 6b 73 20 63 6f 6d 70 6c 65 74 65 6c 79 |looks completely| 00007140 20 64 69 66 66 65 72 65 6e 74 20 74 6f 20 4a 50 | different to JP| 00007150 45 47 2e 20 20 59 6f 75 20 63 61 6e 20 74 61 6b |EG. You can tak| 00007160 65 0a 61 64 76 61 6e 74 61 67 65 20 6f 66 20 74 |e.advantage of t| 00007170 68 65 20 6c 6f 77 2d 64 65 67 72 61 64 61 74 69 |he low-degradati| 00007180 6f 6e 20 62 65 68 61 76 69 6f 72 20 69 66 20 79 |on behavior if y| 00007190 6f 75 20 61 72 65 20 63 61 72 65 66 75 6c 20 74 |ou are careful t| 000071a0 6f 20 63 72 6f 70 20 74 68 65 0a 74 6f 70 20 61 |o crop the.top a| 000071b0 6e 64 20 6c 65 66 74 20 6d 61 72 67 69 6e 73 20 |nd left margins | 000071c0 6f 6e 6c 79 20 62 79 20 61 20 6d 75 6c 74 69 70 |only by a multip| 000071d0 6c 65 20 6f 66 20 74 68 65 20 62 6c 6f 63 6b 20 |le of the block | 000071e0 73 69 7a 65 20 28 74 79 70 69 63 61 6c 6c 79 20 |size (typically | 000071f0 31 36 0a 70 69 78 65 6c 73 29 2c 20 73 6f 20 74 |16.pixels), so t| 00007200 68 61 74 20 74 68 65 20 72 65 6d 61 69 6e 69 6e |hat the remainin| 00007210 67 20 62 6c 6f 63 6b 73 20 73 74 61 72 74 20 69 |g blocks start i| 00007220 6e 20 74 68 65 20 73 61 6d 65 20 70 6c 61 63 65 |n the same place| 00007230 73 2e 0a 0a 54 68 65 20 62 6f 74 74 6f 6d 20 6c |s...The bottom l| 00007240 69 6e 65 20 69 73 20 74 68 61 74 20 4a 50 45 47 |ine is that JPEG| 00007250 20 69 73 20 61 20 75 73 65 66 75 6c 20 66 6f 72 | is a useful for| 00007260 6d 61 74 20 66 6f 72 20 61 72 63 68 69 76 61 6c |mat for archival| 00007270 20 73 74 6f 72 61 67 65 20 61 6e 64 0a 74 72 61 | storage and.tra| 00007280 6e 73 6d 69 73 73 69 6f 6e 20 6f 66 20 69 6d 61 |nsmission of ima| 00007290 67 65 73 2c 20 62 75 74 20 79 6f 75 20 64 6f 6e |ges, but you don| 000072a0 27 74 20 77 61 6e 74 20 74 6f 20 75 73 65 20 69 |'t want to use i| 000072b0 74 20 61 73 20 61 6e 20 69 6e 74 65 72 6d 65 64 |t as an intermed| 000072c0 69 61 74 65 0a 66 6f 72 6d 61 74 20 66 6f 72 20 |iate.format for | 000072d0 73 65 71 75 65 6e 63 65 73 20 6f 66 20 69 6d 61 |sequences of ima| 000072e0 67 65 20 6d 61 6e 69 70 75 6c 61 74 69 6f 6e 20 |ge manipulation | 000072f0 73 74 65 70 73 2e 20 20 55 73 65 20 61 20 6c 6f |steps. Use a lo| 00007300 73 73 6c 65 73 73 20 32 34 2d 62 69 74 0a 66 6f |ssless 24-bit.fo| 00007310 72 6d 61 74 20 28 50 50 4d 2c 20 52 4c 45 2c 20 |rmat (PPM, RLE, | 00007320 54 49 46 46 2c 20 65 74 63 29 20 77 68 69 6c 65 |TIFF, etc) while| 00007330 20 77 6f 72 6b 69 6e 67 20 6f 6e 20 74 68 65 20 | working on the | 00007340 69 6d 61 67 65 2c 20 74 68 65 6e 20 4a 50 45 47 |image, then JPEG| 00007350 20 69 74 20 77 68 65 6e 0a 79 6f 75 20 61 72 65 | it when.you are| 00007360 20 72 65 61 64 79 20 74 6f 20 66 69 6c 65 20 69 | ready to file i| 00007370 74 20 61 77 61 79 2e 20 20 41 73 69 64 65 20 66 |t away. Aside f| 00007380 72 6f 6d 20 61 76 6f 69 64 69 6e 67 20 64 65 67 |rom avoiding deg| 00007390 72 61 64 61 74 69 6f 6e 2c 20 79 6f 75 20 77 69 |radation, you wi| 000073a0 6c 6c 0a 73 61 76 65 20 61 20 6c 6f 74 20 6f 66 |ll.save a lot of| 000073b0 20 63 6f 6d 70 72 65 73 73 69 6f 6e 2f 64 65 63 | compression/dec| 000073c0 6f 6d 70 72 65 73 73 69 6f 6e 20 74 69 6d 65 20 |ompression time | 000073d0 74 68 69 73 20 77 61 79 20 3a 2d 29 2e 0a 0a 2d |this way :-)...-| 000073e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 000073f0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 53 |-------------..S| 00007400 75 62 6a 65 63 74 3a 20 5b 31 31 5d 20 57 68 61 |ubject: [11] Wha| 00007410 74 20 69 73 20 70 72 6f 67 72 65 73 73 69 76 65 |t is progressive| 00007420 20 4a 50 45 47 3f 0a 0a 41 20 73 69 6d 70 6c 65 | JPEG?..A simple| 00007430 20 6f 72 20 22 62 61 73 65 6c 69 6e 65 22 20 4a | or "baseline" J| 00007440 50 45 47 20 66 69 6c 65 20 69 73 20 73 74 6f 72 |PEG file is stor| 00007450 65 64 20 61 73 20 6f 6e 65 20 74 6f 70 2d 74 6f |ed as one top-to| 00007460 2d 62 6f 74 74 6f 6d 20 73 63 61 6e 20 6f 66 20 |-bottom scan of | 00007470 74 68 65 0a 69 6d 61 67 65 2e 20 20 50 72 6f 67 |the.image. Prog| 00007480 72 65 73 73 69 76 65 20 4a 50 45 47 20 61 6c 6c |ressive JPEG all| 00007490 6f 77 73 20 74 68 65 20 69 6d 61 67 65 20 74 6f |ows the image to| 000074a0 20 62 65 20 73 74 6f 72 65 64 20 61 73 20 61 20 | be stored as a | 000074b0 73 65 72 69 65 73 20 6f 66 20 73 63 61 6e 73 0a |series of scans.| 000074c0 6f 66 20 69 6e 63 72 65 61 73 69 6e 67 20 71 75 |of increasing qu| 000074d0 61 6c 69 74 79 2e 20 20 54 68 65 20 66 69 72 73 |ality. The firs| 000074e0 74 20 73 63 61 6e 20 73 68 6f 77 73 20 74 68 65 |t scan shows the| 000074f0 20 69 6d 61 67 65 20 61 74 20 74 68 65 20 65 71 | image at the eq| 00007500 75 69 76 61 6c 65 6e 74 20 6f 66 0a 61 20 76 65 |uivalent of.a ve| 00007510 72 79 20 6c 6f 77 20 71 75 61 6c 69 74 79 20 73 |ry low quality s| 00007520 65 74 74 69 6e 67 2c 20 61 6e 64 20 74 68 65 72 |etting, and ther| 00007530 65 66 6f 72 65 20 69 74 20 74 61 6b 65 73 20 76 |efore it takes v| 00007540 65 72 79 20 6c 69 74 74 6c 65 20 73 70 61 63 65 |ery little space| 00007550 2e 0a 53 75 63 63 65 73 73 69 76 65 20 73 63 61 |..Successive sca| 00007560 6e 73 20 69 6d 70 72 6f 76 65 20 74 68 65 20 71 |ns improve the q| 00007570 75 61 6c 69 74 79 2e 20 20 45 61 63 68 20 73 63 |uality. Each sc| 00007580 61 6e 20 61 64 64 73 20 74 6f 20 74 68 65 20 64 |an adds to the d| 00007590 61 74 61 20 61 6c 72 65 61 64 79 0a 70 72 6f 76 |ata already.prov| 000075a0 69 64 65 64 2c 20 73 6f 20 74 68 61 74 20 74 68 |ided, so that th| 000075b0 65 20 74 6f 74 61 6c 20 73 74 6f 72 61 67 65 20 |e total storage | 000075c0 72 65 71 75 69 72 65 6d 65 6e 74 20 69 73 20 61 |requirement is a| 000075d0 62 6f 75 74 20 74 68 65 20 73 61 6d 65 20 61 73 |bout the same as| 000075e0 20 66 6f 72 20 61 0a 62 61 73 65 6c 69 6e 65 20 | for a.baseline | 000075f0 4a 50 45 47 20 69 6d 61 67 65 20 6f 66 20 74 68 |JPEG image of th| 00007600 65 20 73 61 6d 65 20 71 75 61 6c 69 74 79 20 61 |e same quality a| 00007610 73 20 74 68 65 20 66 69 6e 61 6c 20 73 63 61 6e |s the final scan| 00007620 2e 20 20 28 42 61 73 69 63 61 6c 6c 79 2c 0a 70 |. (Basically,.p| 00007630 72 6f 67 72 65 73 73 69 76 65 20 4a 50 45 47 20 |rogressive JPEG | 00007640 69 73 20 6a 75 73 74 20 61 20 72 65 61 72 72 61 |is just a rearra| 00007650 6e 67 65 6d 65 6e 74 20 6f 66 20 74 68 65 20 73 |ngement of the s| 00007660 61 6d 65 20 64 61 74 61 20 69 6e 74 6f 20 61 20 |ame data into a | 00007670 6d 6f 72 65 0a 63 6f 6d 70 6c 69 63 61 74 65 64 |more.complicated| 00007680 20 6f 72 64 65 72 2e 29 0a 0a 54 68 65 20 61 64 | order.)..The ad| 00007690 76 61 6e 74 61 67 65 20 6f 66 20 70 72 6f 67 72 |vantage of progr| 000076a0 65 73 73 69 76 65 20 4a 50 45 47 20 69 73 20 74 |essive JPEG is t| 000076b0 68 61 74 20 69 66 20 61 6e 20 69 6d 61 67 65 20 |hat if an image | 000076c0 69 73 20 62 65 69 6e 67 20 76 69 65 77 65 64 0a |is being viewed.| 000076d0 6f 6e 2d 74 68 65 2d 66 6c 79 20 61 73 20 69 74 |on-the-fly as it| 000076e0 20 69 73 20 74 72 61 6e 73 6d 69 74 74 65 64 2c | is transmitted,| 000076f0 20 74 68 65 20 76 69 65 77 65 72 20 73 65 65 73 | the viewer sees| 00007700 20 61 6e 20 61 70 70 72 6f 78 69 6d 61 74 69 6f | an approximatio| 00007710 6e 20 74 6f 20 74 68 65 0a 77 68 6f 6c 65 20 69 |n to the.whole i| 00007720 6d 61 67 65 20 76 65 72 79 20 71 75 69 63 6b 6c |mage very quickl| 00007730 79 2c 20 77 69 74 68 20 67 72 61 64 75 61 6c 20 |y, with gradual | 00007740 69 6d 70 72 6f 76 65 6d 65 6e 74 20 6f 66 20 71 |improvement of q| 00007750 75 61 6c 69 74 79 20 61 73 20 6f 6e 65 20 77 61 |uality as one wa| 00007760 69 74 73 0a 6c 6f 6e 67 65 72 3b 20 74 68 69 73 |its.longer; this| 00007770 20 69 73 20 6d 75 63 68 20 6e 69 63 65 72 20 74 | is much nicer t| 00007780 68 61 6e 20 61 20 73 6c 6f 77 20 74 6f 70 2d 74 |han a slow top-t| 00007790 6f 2d 62 6f 74 74 6f 6d 20 64 69 73 70 6c 61 79 |o-bottom display| 000077a0 20 6f 66 20 74 68 65 20 69 6d 61 67 65 2e 0a 54 | of the image..T| 000077b0 68 65 20 64 69 73 61 64 76 61 6e 74 61 67 65 20 |he disadvantage | 000077c0 69 73 20 74 68 61 74 20 65 61 63 68 20 73 63 61 |is that each sca| 000077d0 6e 20 74 61 6b 65 73 20 61 62 6f 75 74 20 74 68 |n takes about th| 000077e0 65 20 73 61 6d 65 20 61 6d 6f 75 6e 74 20 6f 66 |e same amount of| 000077f0 0a 63 6f 6d 70 75 74 61 74 69 6f 6e 20 74 6f 20 |.computation to | 00007800 64 69 73 70 6c 61 79 20 61 73 20 61 20 77 68 6f |display as a who| 00007810 6c 65 20 62 61 73 65 6c 69 6e 65 20 4a 50 45 47 |le baseline JPEG| 00007820 20 66 69 6c 65 20 77 6f 75 6c 64 2e 20 20 53 6f | file would. So| 00007830 20 70 72 6f 67 72 65 73 73 69 76 65 0a 4a 50 45 | progressive.JPE| 00007840 47 20 6f 6e 6c 79 20 6d 61 6b 65 73 20 73 65 6e |G only makes sen| 00007850 73 65 20 69 66 20 6f 6e 65 20 68 61 73 20 61 20 |se if one has a | 00007860 64 65 63 6f 64 65 72 20 74 68 61 74 27 73 20 6d |decoder that's m| 00007870 75 63 68 20 66 61 73 74 65 72 20 74 68 61 6e 20 |uch faster than | 00007880 74 68 65 0a 63 6f 6d 6d 75 6e 69 63 61 74 69 6f |the.communicatio| 00007890 6e 20 6c 69 6e 6b 2e 0a 0a 55 70 20 75 6e 74 69 |n link...Up unti| 000078a0 6c 20 72 65 63 65 6e 74 6c 79 2c 20 74 68 65 72 |l recently, ther| 000078b0 65 20 77 65 72 65 6e 27 74 20 6d 61 6e 79 20 61 |e weren't many a| 000078c0 70 70 6c 69 63 61 74 69 6f 6e 73 20 69 6e 20 77 |pplications in w| 000078d0 68 69 63 68 20 70 72 6f 67 72 65 73 73 69 76 65 |hich progressive| 000078e0 20 4a 50 45 47 0a 6c 6f 6f 6b 65 64 20 61 74 74 | JPEG.looked att| 000078f0 72 61 63 74 69 76 65 2c 20 73 6f 20 69 74 20 68 |ractive, so it h| 00007900 61 73 6e 27 74 20 62 65 65 6e 20 77 69 64 65 6c |asn't been widel| 00007910 79 20 69 6d 70 6c 65 6d 65 6e 74 65 64 2e 20 20 |y implemented. | 00007920 42 75 74 20 77 69 74 68 20 74 68 65 0a 70 6f 70 |But with the.pop| 00007930 75 6c 61 72 69 74 79 20 6f 66 20 57 57 57 20 62 |ularity of WWW b| 00007940 72 6f 77 73 65 72 73 20 72 75 6e 6e 69 6e 67 20 |rowsers running | 00007950 6f 76 65 72 20 73 6c 6f 77 20 6d 6f 64 65 6d 20 |over slow modem | 00007960 6c 69 6e 6b 73 2c 20 61 6e 64 20 77 69 74 68 20 |links, and with | 00007970 74 68 65 0a 65 76 65 72 2d 69 6e 63 72 65 61 73 |the.ever-increas| 00007980 69 6e 67 20 68 6f 72 73 65 70 6f 77 65 72 20 6f |ing horsepower o| 00007990 66 20 70 65 72 73 6f 6e 61 6c 20 63 6f 6d 70 75 |f personal compu| 000079a0 74 65 72 73 2c 20 70 72 6f 67 72 65 73 73 69 76 |ters, progressiv| 000079b0 65 20 4a 50 45 47 20 6c 6f 6f 6b 73 0a 6c 69 6b |e JPEG looks.lik| 000079c0 65 20 61 20 77 69 6e 20 66 6f 72 20 57 57 57 2e |e a win for WWW.| 000079d0 20 20 49 4a 47 27 73 20 66 72 65 65 20 4a 50 45 | IJG's free JPE| 000079e0 47 20 73 6f 66 74 77 61 72 65 20 28 73 65 65 20 |G software (see | 000079f0 70 61 72 74 20 32 29 20 6e 6f 77 20 73 75 70 70 |part 2) now supp| 00007a00 6f 72 74 73 0a 70 72 6f 67 72 65 73 73 69 76 65 |orts.progressive| 00007a10 20 4a 50 45 47 2c 20 61 6e 64 20 49 20 65 78 70 | JPEG, and I exp| 00007a20 65 63 74 20 74 68 61 74 20 74 68 65 20 63 61 70 |ect that the cap| 00007a30 61 62 69 6c 69 74 79 20 77 69 6c 6c 20 73 74 61 |ability will sta| 00007a40 72 74 20 74 6f 20 61 70 70 65 61 72 20 69 6e 0a |rt to appear in.| 00007a50 57 57 57 20 62 72 6f 77 73 65 72 73 20 6f 76 65 |WWW browsers ove| 00007a60 72 20 74 68 65 20 6e 65 78 74 20 66 65 77 20 6d |r the next few m| 00007a70 6f 6e 74 68 73 20 28 66 61 6c 6c 2f 77 69 6e 74 |onths (fall/wint| 00007a80 65 72 20 31 39 39 35 29 2e 0a 0a 41 20 70 72 6f |er 1995)...A pro| 00007a90 67 72 65 73 73 69 76 65 20 4a 50 45 47 20 66 69 |gressive JPEG fi| 00007aa0 6c 65 20 69 73 20 6e 6f 74 20 72 65 61 64 61 62 |le is not readab| 00007ab0 6c 65 20 61 74 20 61 6c 6c 20 62 79 20 61 20 62 |le at all by a b| 00007ac0 61 73 65 6c 69 6e 65 2d 6f 6e 6c 79 20 4a 50 45 |aseline-only JPE| 00007ad0 47 0a 64 65 63 6f 64 65 72 2c 20 73 6f 20 65 78 |G.decoder, so ex| 00007ae0 69 73 74 69 6e 67 20 73 6f 66 74 77 61 72 65 20 |isting software | 00007af0 77 69 6c 6c 20 68 61 76 65 20 74 6f 20 62 65 20 |will have to be | 00007b00 75 70 67 72 61 64 65 64 20 62 65 66 6f 72 65 20 |upgraded before | 00007b10 70 72 6f 67 72 65 73 73 69 76 65 0a 4a 50 45 47 |progressive.JPEG| 00007b20 20 63 61 6e 20 62 65 20 75 73 65 64 20 77 69 64 | can be used wid| 00007b30 65 6c 79 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |ely...----------| 00007b40 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00007b50 2d 2d 2d 2d 0a 0a 53 75 62 6a 65 63 74 3a 20 5b |----..Subject: [| 00007b60 31 32 5d 20 49 73 6e 27 74 20 74 68 65 72 65 20 |12] Isn't there | 00007b70 61 20 6c 6f 73 73 6c 65 73 73 20 4a 50 45 47 3f |a lossless JPEG?| 00007b80 0a 0a 54 68 65 72 65 27 73 20 61 20 67 72 65 61 |..There's a grea| 00007b90 74 20 64 65 61 6c 20 6f 66 20 63 6f 6e 66 75 73 |t deal of confus| 00007ba0 69 6f 6e 20 6f 6e 20 74 68 69 73 20 73 75 62 6a |ion on this subj| 00007bb0 65 63 74 2e 20 20 54 68 65 20 4a 50 45 47 20 73 |ect. The JPEG s| 00007bc0 74 61 6e 64 61 72 64 20 64 6f 65 73 0a 69 6e 63 |tandard does.inc| 00007bd0 6c 75 64 65 20 61 20 74 72 75 6c 79 20 6c 6f 73 |lude a truly los| 00007be0 73 6c 65 73 73 20 63 6f 6d 70 72 65 73 73 69 6f |sless compressio| 00007bf0 6e 20 61 6c 67 6f 72 69 74 68 6d 2c 20 69 2e 65 |n algorithm, i.e| 00007c00 2e 2c 20 6f 6e 65 20 74 68 61 74 20 67 75 61 72 |., one that guar| 00007c10 61 6e 74 65 65 73 0a 69 74 73 20 64 65 63 6f 6d |antees.its decom| 00007c20 70 72 65 73 73 65 64 20 6f 75 74 70 75 74 20 69 |pressed output i| 00007c30 73 20 62 69 74 2d 66 6f 72 2d 62 69 74 20 69 64 |s bit-for-bit id| 00007c40 65 6e 74 69 63 61 6c 20 74 6f 20 74 68 65 20 6f |entical to the o| 00007c50 72 69 67 69 6e 61 6c 20 69 6e 70 75 74 2e 0a 48 |riginal input..H| 00007c60 6f 77 65 76 65 72 2c 20 74 68 69 73 20 6c 6f 73 |owever, this los| 00007c70 73 6c 65 73 73 20 6d 6f 64 65 20 68 61 73 20 61 |sless mode has a| 00007c80 6c 6d 6f 73 74 20 6e 6f 74 68 69 6e 67 20 69 6e |lmost nothing in| 00007c90 20 63 6f 6d 6d 6f 6e 20 77 69 74 68 20 74 68 65 | common with the| 00007ca0 20 72 65 67 75 6c 61 72 0a 6c 6f 73 73 79 20 4a | regular.lossy J| 00007cb0 50 45 47 20 61 6c 67 6f 72 69 74 68 6d 2c 20 61 |PEG algorithm, a| 00007cc0 6e 64 20 69 74 20 6f 66 66 65 72 73 20 6d 75 63 |nd it offers muc| 00007cd0 68 20 6c 65 73 73 20 63 6f 6d 70 72 65 73 73 69 |h less compressi| 00007ce0 6f 6e 2e 0a 0a 4c 6f 73 73 6c 65 73 73 20 4a 50 |on...Lossless JP| 00007cf0 45 47 20 74 79 70 69 63 61 6c 6c 79 20 63 6f 6d |EG typically com| 00007d00 70 72 65 73 73 65 73 20 66 75 6c 6c 2d 63 6f 6c |presses full-col| 00007d10 6f 72 20 64 61 74 61 20 62 79 20 61 72 6f 75 6e |or data by aroun| 00007d20 64 20 32 3a 31 2e 20 20 4c 6f 73 73 6c 65 73 73 |d 2:1. Lossless| 00007d30 0a 4a 50 45 47 20 77 6f 72 6b 73 20 77 65 6c 6c |.JPEG works well| 00007d40 20 6f 6e 6c 79 20 6f 6e 20 63 6f 6e 74 69 6e 75 | only on continu| 00007d50 6f 75 73 2d 74 6f 6e 65 20 69 6d 61 67 65 73 3b |ous-tone images;| 00007d60 20 69 74 20 64 6f 65 73 20 6e 6f 74 20 70 72 6f | it does not pro| 00007d70 76 69 64 65 20 75 73 65 66 75 6c 0a 63 6f 6d 70 |vide useful.comp| 00007d80 72 65 73 73 69 6f 6e 20 6f 66 20 70 61 6c 65 74 |ression of palet| 00007d90 74 65 2d 63 6f 6c 6f 72 20 69 6d 61 67 65 73 20 |te-color images | 00007da0 6f 72 20 6c 6f 77 2d 62 69 74 2d 64 65 70 74 68 |or low-bit-depth| 00007db0 20 69 6d 61 67 65 73 2e 20 20 28 45 61 72 6c 79 | images. (Early| 00007dc0 20 72 65 73 75 6c 74 73 0a 77 69 74 68 20 74 68 | results.with th| 00007dd0 65 20 6e 65 77 20 50 4e 47 20 73 74 61 6e 64 61 |e new PNG standa| 00007de0 72 64 20 73 75 67 67 65 73 74 20 74 68 61 74 20 |rd suggest that | 00007df0 50 4e 47 20 6f 75 74 63 6f 6d 70 72 65 73 73 65 |PNG outcompresse| 00007e00 73 20 6c 6f 73 73 6c 65 73 73 20 4a 50 45 47 20 |s lossless JPEG | 00007e10 6f 6e 0a 6d 6f 73 74 20 69 6d 61 67 65 73 2e 20 |on.most images. | 00007e20 20 4f 6e 63 65 20 50 4e 47 20 62 65 63 6f 6d 65 | Once PNG become| 00007e30 73 20 63 6f 6d 6d 6f 6e 2c 20 6c 6f 73 73 6c 65 |s common, lossle| 00007e40 73 73 20 4a 50 45 47 20 77 69 6c 6c 20 70 72 6f |ss JPEG will pro| 00007e50 62 61 62 6c 79 20 62 65 0a 6f 62 73 6f 6c 65 74 |bably be.obsolet| 00007e60 65 2e 29 0a 0a 54 68 65 72 65 20 61 72 65 20 76 |e.)..There are v| 00007e70 65 72 79 20 66 65 77 20 69 6d 70 6c 65 6d 65 6e |ery few implemen| 00007e80 74 61 74 69 6f 6e 73 20 6f 66 20 74 72 75 65 20 |tations of true | 00007e90 6c 6f 73 73 6c 65 73 73 20 4a 50 45 47 2e 20 20 |lossless JPEG. | 00007ea0 54 68 65 20 50 56 52 47 20 63 6f 64 65 0a 6d 65 |The PVRG code.me| 00007eb0 6e 74 69 6f 6e 65 64 20 69 6e 20 70 61 72 74 20 |ntioned in part | 00007ec0 32 20 68 61 6e 64 6c 65 73 20 6c 6f 73 73 6c 65 |2 handles lossle| 00007ed0 73 73 20 4a 50 45 47 2e 20 20 41 6e 6f 74 68 65 |ss JPEG. Anothe| 00007ee0 72 20 66 72 65 65 20 69 6d 70 6c 65 6d 65 6e 74 |r free implement| 00007ef0 61 74 69 6f 6e 0a 69 73 20 61 76 61 69 6c 61 62 |ation.is availab| 00007f00 6c 65 20 66 72 6f 6d 20 66 74 70 2e 63 73 2e 63 |le from ftp.cs.c| 00007f10 6f 72 6e 65 6c 6c 2e 65 64 75 3a 2f 70 75 62 2f |ornell.edu:/pub/| 00007f20 6d 75 6c 74 69 6d 65 64 2f 6c 6a 70 67 2e 74 61 |multimed/ljpg.ta| 00007f30 72 2e 5a 2e 20 20 54 68 69 73 20 69 73 20 61 0a |r.Z. This is a.| 00007f40 73 6d 61 6c 6c 65 72 20 70 72 6f 67 72 61 6d 20 |smaller program | 00007f50 74 68 61 74 20 68 61 6e 64 6c 65 73 20 2a 6f 6e |that handles *on| 00007f60 6c 79 2a 20 6c 6f 73 73 6c 65 73 73 20 4a 50 45 |ly* lossless JPE| 00007f70 47 2e 0a 0a 43 72 61 6e 6b 69 6e 67 20 61 20 72 |G...Cranking a r| 00007f80 65 67 75 6c 61 72 20 4a 50 45 47 20 69 6d 70 6c |egular JPEG impl| 00007f90 65 6d 65 6e 74 61 74 69 6f 6e 20 75 70 20 74 6f |ementation up to| 00007fa0 20 69 74 73 20 6d 61 78 69 6d 75 6d 20 71 75 61 | its maximum qua| 00007fb0 6c 69 74 79 20 73 65 74 74 69 6e 67 0a 2a 64 6f |lity setting.*do| 00007fc0 65 73 20 6e 6f 74 2a 20 67 65 74 20 79 6f 75 20 |es not* get you | 00007fd0 6c 6f 73 73 6c 65 73 73 20 73 74 6f 72 61 67 65 |lossless storage| 00007fe0 3b 20 6c 6f 73 73 6c 65 73 73 20 4a 50 45 47 20 |; lossless JPEG | 00007ff0 69 73 20 61 20 66 75 6e 64 61 6d 65 6e 74 61 6c |is a fundamental| 00008000 6c 79 0a 64 69 66 66 65 72 65 6e 74 20 6d 65 74 |ly.different met| 00008010 68 6f 64 2e 20 20 45 76 65 6e 20 61 74 20 74 68 |hod. Even at th| 00008020 65 20 6d 61 78 69 6d 75 6d 20 70 6f 73 73 69 62 |e maximum possib| 00008030 6c 65 20 71 75 61 6c 69 74 79 20 73 65 74 74 69 |le quality setti| 00008040 6e 67 2c 20 72 65 67 75 6c 61 72 0a 4a 50 45 47 |ng, regular.JPEG| 00008050 20 63 61 6e 6e 6f 74 20 62 65 20 6c 6f 73 73 6c | cannot be lossl| 00008060 65 73 73 20 62 65 63 61 75 73 65 20 69 74 20 69 |ess because it i| 00008070 73 20 73 75 62 6a 65 63 74 20 74 6f 20 72 6f 75 |s subject to rou| 00008080 6e 64 6f 66 66 20 65 72 72 6f 72 73 20 69 6e 20 |ndoff errors in | 00008090 76 61 72 69 6f 75 73 0a 63 61 6c 63 75 6c 61 74 |various.calculat| 000080a0 69 6f 6e 73 2e 20 20 54 68 65 20 72 6f 75 6e 64 |ions. The round| 000080b0 6f 66 66 20 65 72 72 6f 72 73 20 61 72 65 20 6e |off errors are n| 000080c0 65 61 72 6c 79 20 61 6c 77 61 79 73 20 74 6f 6f |early always too| 000080d0 20 73 6d 61 6c 6c 20 74 6f 20 62 65 20 73 65 65 | small to be see| 000080e0 6e 2c 0a 62 75 74 20 74 68 65 79 20 77 69 6c 6c |n,.but they will| 000080f0 20 61 63 63 75 6d 75 6c 61 74 65 20 69 66 20 79 | accumulate if y| 00008100 6f 75 20 70 75 74 20 74 68 65 20 69 6d 61 67 65 |ou put the image| 00008110 20 74 68 72 6f 75 67 68 20 6d 75 6c 74 69 70 6c | through multipl| 00008120 65 20 63 79 63 6c 65 73 20 6f 66 0a 63 6f 6d 70 |e cycles of.comp| 00008130 72 65 73 73 69 6f 6e 2e 0a 0a 4d 61 6e 79 20 69 |ression...Many i| 00008140 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 77 |mplementations w| 00008150 6f 6e 27 74 20 65 76 65 6e 20 6c 65 74 20 79 6f |on't even let yo| 00008160 75 20 67 65 74 20 74 6f 20 74 68 65 20 6d 61 78 |u get to the max| 00008170 69 6d 75 6d 20 70 6f 73 73 69 62 6c 65 20 73 65 |imum possible se| 00008180 74 74 69 6e 67 2c 0a 62 65 63 61 75 73 65 20 69 |tting,.because i| 00008190 74 27 73 20 73 75 63 68 20 61 6e 20 69 6e 65 66 |t's such an inef| 000081a0 66 69 63 69 65 6e 74 20 77 61 79 20 74 6f 20 75 |ficient way to u| 000081b0 73 65 20 72 65 67 75 6c 61 72 20 4a 50 45 47 2e |se regular JPEG.| 000081c0 20 20 57 69 74 68 20 74 68 65 20 49 4a 47 20 4a | With the IJG J| 000081d0 50 45 47 0a 73 6f 66 74 77 61 72 65 2c 20 66 6f |PEG.software, fo| 000081e0 72 20 65 78 61 6d 70 6c 65 2c 20 79 6f 75 20 68 |r example, you h| 000081f0 61 76 65 20 74 6f 20 73 61 79 20 6e 6f 74 20 6f |ave to say not o| 00008200 6e 6c 79 20 22 2d 71 75 61 6c 69 74 79 20 31 30 |nly "-quality 10| 00008210 30 22 20 62 75 74 20 61 6c 73 6f 0a 22 2d 73 61 |0" but also."-sa| 00008220 6d 70 6c 65 20 31 78 31 22 20 74 6f 20 65 6c 69 |mple 1x1" to eli| 00008230 6d 69 6e 61 74 65 20 61 6c 6c 20 64 65 6c 69 62 |minate all delib| 00008240 65 72 61 74 65 20 6c 6f 73 73 20 6f 66 20 69 6e |erate loss of in| 00008250 66 6f 72 6d 61 74 69 6f 6e 2e 20 20 54 68 65 0a |formation. The.| 00008260 72 65 73 75 6c 74 69 6e 67 20 66 69 6c 65 73 20 |resulting files | 00008270 61 72 65 20 66 61 72 20 6c 61 72 67 65 72 20 61 |are far larger a| 00008280 6e 64 20 6f 66 20 6f 6e 6c 79 20 66 72 61 63 74 |nd of only fract| 00008290 69 6f 6e 61 6c 6c 79 20 62 65 74 74 65 72 20 71 |ionally better q| 000082a0 75 61 6c 69 74 79 20 74 68 61 6e 0a 66 69 6c 65 |uality than.file| 000082b0 73 20 67 65 6e 65 72 61 74 65 64 20 61 74 20 6d |s generated at m| 000082c0 6f 72 65 20 72 65 61 73 6f 6e 61 62 6c 65 20 73 |ore reasonable s| 000082d0 65 74 74 69 6e 67 73 2e 20 20 41 6e 64 20 74 68 |ettings. And th| 000082e0 65 79 27 72 65 20 73 74 69 6c 6c 20 73 6c 69 67 |ey're still slig| 000082f0 68 74 6c 79 0a 6c 6f 73 73 79 21 20 20 49 66 20 |htly.lossy! If | 00008300 79 6f 75 20 72 65 61 6c 6c 79 20 6e 65 65 64 20 |you really need | 00008310 6c 6f 73 73 6c 65 73 73 20 73 74 6f 72 61 67 65 |lossless storage| 00008320 2c 20 64 6f 6e 27 74 20 74 72 79 20 74 6f 20 61 |, don't try to a| 00008330 70 70 72 6f 78 69 6d 61 74 65 20 69 74 0a 77 69 |pproximate it.wi| 00008340 74 68 20 72 65 67 75 6c 61 72 20 4a 50 45 47 2e |th regular JPEG.| 00008350 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |..--------------| 00008360 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00008370 0a 0a 53 75 62 6a 65 63 74 3a 20 5b 31 33 5d 20 |..Subject: [13] | 00008380 57 68 79 20 61 6c 6c 20 74 68 65 20 61 72 67 75 |Why all the argu| 00008390 6d 65 6e 74 20 61 62 6f 75 74 20 66 69 6c 65 20 |ment about file | 000083a0 66 6f 72 6d 61 74 73 3f 0a 0a 53 74 72 69 63 74 |formats?..Strict| 000083b0 6c 79 20 73 70 65 61 6b 69 6e 67 2c 20 4a 50 45 |ly speaking, JPE| 000083c0 47 20 72 65 66 65 72 73 20 6f 6e 6c 79 20 74 6f |G refers only to| 000083d0 20 61 20 66 61 6d 69 6c 79 20 6f 66 20 63 6f 6d | a family of com| 000083e0 70 72 65 73 73 69 6f 6e 20 61 6c 67 6f 72 69 74 |pression algorit| 000083f0 68 6d 73 3b 0a 69 74 20 64 6f 65 73 20 2a 6e 6f |hms;.it does *no| 00008400 74 2a 20 72 65 66 65 72 20 74 6f 20 61 20 73 70 |t* refer to a sp| 00008410 65 63 69 66 69 63 20 69 6d 61 67 65 20 66 69 6c |ecific image fil| 00008420 65 20 66 6f 72 6d 61 74 2e 20 20 54 68 65 20 4a |e format. The J| 00008430 50 45 47 20 63 6f 6d 6d 69 74 74 65 65 20 77 61 |PEG committee wa| 00008440 73 0a 70 72 65 76 65 6e 74 65 64 20 66 72 6f 6d |s.prevented from| 00008450 20 64 65 66 69 6e 69 6e 67 20 61 20 66 69 6c 65 | defining a file| 00008460 20 66 6f 72 6d 61 74 20 62 79 20 74 75 72 66 20 | format by turf | 00008470 77 61 72 73 20 77 69 74 68 69 6e 20 74 68 65 20 |wars within the | 00008480 69 6e 74 65 72 6e 61 74 69 6f 6e 61 6c 0a 73 74 |international.st| 00008490 61 6e 64 61 72 64 73 20 6f 72 67 61 6e 69 7a 61 |andards organiza| 000084a0 74 69 6f 6e 73 2e 0a 0a 53 69 6e 63 65 20 77 65 |tions...Since we| 000084b0 20 63 61 6e 27 74 20 61 63 74 75 61 6c 6c 79 20 | can't actually | 000084c0 65 78 63 68 61 6e 67 65 20 69 6d 61 67 65 73 20 |exchange images | 000084d0 77 69 74 68 20 61 6e 79 6f 6e 65 20 65 6c 73 65 |with anyone else| 000084e0 20 75 6e 6c 65 73 73 20 77 65 20 61 67 72 65 65 | unless we agree| 000084f0 20 6f 6e 0a 61 20 63 6f 6d 6d 6f 6e 20 66 69 6c | on.a common fil| 00008500 65 20 66 6f 72 6d 61 74 2c 20 74 68 69 73 20 6c |e format, this l| 00008510 65 61 76 65 73 20 75 73 20 77 69 74 68 20 61 20 |eaves us with a | 00008520 70 72 6f 62 6c 65 6d 2e 20 20 49 6e 20 74 68 65 |problem. In the| 00008530 20 61 62 73 65 6e 63 65 20 6f 66 0a 6f 66 66 69 | absence of.offi| 00008540 63 69 61 6c 20 73 74 61 6e 64 61 72 64 73 2c 20 |cial standards, | 00008550 61 20 6e 75 6d 62 65 72 20 6f 66 20 4a 50 45 47 |a number of JPEG| 00008560 20 70 72 6f 67 72 61 6d 20 77 72 69 74 65 72 73 | program writers| 00008570 20 68 61 76 65 20 6a 75 73 74 20 67 6f 6e 65 20 | have just gone | 00008580 6f 66 66 20 74 6f 0a 22 64 6f 20 74 68 65 69 72 |off to."do their| 00008590 20 6f 77 6e 20 74 68 69 6e 67 22 2c 20 61 6e 64 | own thing", and| 000085a0 20 61 73 20 61 20 72 65 73 75 6c 74 20 74 68 65 | as a result the| 000085b0 69 72 20 70 72 6f 67 72 61 6d 73 20 61 72 65 6e |ir programs aren| 000085c0 27 74 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 |'t compatible wi| 000085d0 74 68 0a 61 6e 79 6f 6e 65 20 65 6c 73 65 27 73 |th.anyone else's| 000085e0 2e 0a 0a 54 68 65 20 63 6c 6f 73 65 73 74 20 74 |...The closest t| 000085f0 68 69 6e 67 20 77 65 20 68 61 76 65 20 74 6f 20 |hing we have to | 00008600 61 20 73 74 61 6e 64 61 72 64 20 4a 50 45 47 20 |a standard JPEG | 00008610 66 6f 72 6d 61 74 20 69 73 20 73 6f 6d 65 20 77 |format is some w| 00008620 6f 72 6b 20 74 68 61 74 27 73 20 62 65 65 6e 0a |ork that's been.| 00008630 63 6f 6f 72 64 69 6e 61 74 65 64 20 62 79 20 70 |coordinated by p| 00008640 65 6f 70 6c 65 20 61 74 20 43 2d 43 75 62 65 20 |eople at C-Cube | 00008650 4d 69 63 72 6f 73 79 73 74 65 6d 73 2e 20 20 54 |Microsystems. T| 00008660 68 65 79 20 68 61 76 65 20 64 65 66 69 6e 65 64 |hey have defined| 00008670 20 74 77 6f 0a 4a 50 45 47 2d 62 61 73 65 64 20 | two.JPEG-based | 00008680 66 69 6c 65 20 66 6f 72 6d 61 74 73 3a 0a 20 20 |file formats:. | 00008690 2a 20 4a 46 49 46 20 28 4a 50 45 47 20 46 69 6c |* JFIF (JPEG Fil| 000086a0 65 20 49 6e 74 65 72 63 68 61 6e 67 65 20 46 6f |e Interchange Fo| 000086b0 72 6d 61 74 29 2c 20 61 20 22 6c 6f 77 2d 65 6e |rmat), a "low-en| 000086c0 64 22 20 66 6f 72 6d 61 74 20 74 68 61 74 20 74 |d" format that t| 000086d0 72 61 6e 73 70 6f 72 74 73 0a 20 20 20 20 70 69 |ransports. pi| 000086e0 78 65 6c 73 20 61 6e 64 20 6e 6f 74 20 6d 75 63 |xels and not muc| 000086f0 68 20 65 6c 73 65 2e 0a 20 20 2a 20 54 49 46 46 |h else.. * TIFF| 00008700 2f 4a 50 45 47 2c 20 61 6b 61 20 54 49 46 46 20 |/JPEG, aka TIFF | 00008710 36 2e 30 2c 20 61 6e 20 65 78 74 65 6e 73 69 6f |6.0, an extensio| 00008720 6e 20 6f 66 20 74 68 65 20 41 6c 64 75 73 20 54 |n of the Aldus T| 00008730 49 46 46 20 66 6f 72 6d 61 74 2e 20 20 54 49 46 |IFF format. TIF| 00008740 46 20 69 73 0a 20 20 20 20 61 20 22 68 69 67 68 |F is. a "high| 00008750 2d 65 6e 64 22 20 66 6f 72 6d 61 74 20 74 68 61 |-end" format tha| 00008760 74 20 77 69 6c 6c 20 6c 65 74 20 79 6f 75 20 72 |t will let you r| 00008770 65 63 6f 72 64 20 6a 75 73 74 20 61 62 6f 75 74 |ecord just about| 00008780 20 65 76 65 72 79 74 68 69 6e 67 20 79 6f 75 0a | everything you.| 00008790 20 20 20 20 65 76 65 72 20 77 61 6e 74 65 64 20 | ever wanted | 000087a0 74 6f 20 6b 6e 6f 77 20 61 62 6f 75 74 20 61 6e |to know about an| 000087b0 20 69 6d 61 67 65 2c 20 61 6e 64 20 61 20 6c 6f | image, and a lo| 000087c0 74 20 6d 6f 72 65 20 62 65 73 69 64 65 73 20 3a |t more besides :| 000087d0 2d 29 2e 20 20 54 49 46 46 0a 20 20 20 20 69 73 |-). TIFF. is| 000087e0 20 66 61 72 20 6d 6f 72 65 20 63 6f 6d 70 6c 65 | far more comple| 000087f0 78 20 74 68 61 6e 20 4a 46 49 46 2c 20 61 6e 64 |x than JFIF, and| 00008800 20 69 73 20 67 65 6e 65 72 61 6c 6c 79 20 6c 65 | is generally le| 00008810 73 73 20 74 72 61 6e 73 70 6f 72 74 61 62 6c 65 |ss transportable| 00008820 2c 0a 20 20 20 20 62 65 63 61 75 73 65 20 64 69 |,. because di| 00008830 66 66 65 72 65 6e 74 20 76 65 6e 64 6f 72 73 20 |fferent vendors | 00008840 68 61 76 65 20 6f 66 74 65 6e 20 69 6d 70 6c 65 |have often imple| 00008850 6d 65 6e 74 65 64 20 73 6c 69 67 68 74 6c 79 20 |mented slightly | 00008860 64 69 66 66 65 72 65 6e 74 0a 20 20 20 20 61 6e |different. an| 00008870 64 20 69 6e 63 6f 6d 70 61 74 69 62 6c 65 20 73 |d incompatible s| 00008880 75 62 73 65 74 73 20 6f 66 20 54 49 46 46 2e 20 |ubsets of TIFF. | 00008890 20 49 74 27 73 20 6e 6f 74 20 6c 69 6b 65 6c 79 | It's not likely| 000088a0 20 74 68 61 74 20 61 64 64 69 6e 67 20 4a 50 45 | that adding JPE| 000088b0 47 20 74 6f 0a 20 20 20 20 74 68 65 20 6d 69 78 |G to. the mix| 000088c0 20 77 69 6c 6c 20 64 6f 20 61 6e 79 74 68 69 6e | will do anythin| 000088d0 67 20 74 6f 20 69 6d 70 72 6f 76 65 20 74 68 69 |g to improve thi| 000088e0 73 20 73 69 74 75 61 74 69 6f 6e 2e 0a 42 6f 74 |s situation..Bot| 000088f0 68 20 6f 66 20 74 68 65 73 65 20 66 6f 72 6d 61 |h of these forma| 00008900 74 73 20 77 65 72 65 20 64 65 76 65 6c 6f 70 65 |ts were develope| 00008910 64 20 77 69 74 68 20 69 6e 70 75 74 20 66 72 6f |d with input fro| 00008920 6d 20 61 6c 6c 20 74 68 65 20 6d 61 6a 6f 72 20 |m all the major | 00008930 76 65 6e 64 6f 72 73 0a 6f 66 20 4a 50 45 47 2d |vendors.of JPEG-| 00008940 72 65 6c 61 74 65 64 20 70 72 6f 64 75 63 74 73 |related products| 00008950 3b 20 69 74 27 73 20 72 65 61 73 6f 6e 61 62 6c |; it's reasonabl| 00008960 79 20 6c 69 6b 65 6c 79 20 74 68 61 74 20 66 75 |y likely that fu| 00008970 74 75 72 65 20 63 6f 6d 6d 65 72 63 69 61 6c 0a |ture commercial.| 00008980 70 72 6f 64 75 63 74 73 20 77 69 6c 6c 20 61 64 |products will ad| 00008990 68 65 72 65 20 74 6f 20 6f 6e 65 20 6f 72 20 62 |here to one or b| 000089a0 6f 74 68 20 73 74 61 6e 64 61 72 64 73 2e 0a 0a |oth standards...| 000089b0 4a 46 49 46 20 68 61 73 20 65 6d 65 72 67 65 64 |JFIF has emerged| 000089c0 20 61 73 20 74 68 65 20 64 65 2d 66 61 63 74 6f | as the de-facto| 000089d0 20 73 74 61 6e 64 61 72 64 20 6f 6e 20 55 73 65 | standard on Use| 000089e0 6e 65 74 2e 20 20 4a 46 49 46 20 69 73 20 73 69 |net. JFIF is si| 000089f0 6d 70 6c 65 72 20 74 68 61 6e 0a 54 49 46 46 20 |mpler than.TIFF | 00008a00 61 6e 64 20 69 73 20 61 76 61 69 6c 61 62 6c 65 |and is available| 00008a10 20 6e 6f 77 3b 20 74 68 65 20 54 49 46 46 20 36 | now; the TIFF 6| 00008a20 2e 30 20 73 70 65 63 20 66 6f 72 20 69 6e 63 6f |.0 spec for inco| 00008a30 72 70 6f 72 61 74 69 6e 67 20 4a 50 45 47 20 69 |rporating JPEG i| 00008a40 73 20 6e 6f 74 0a 77 69 64 65 6c 79 20 69 6d 70 |s not.widely imp| 00008a50 6c 65 6d 65 6e 74 65 64 2c 20 70 61 72 74 6c 79 |lemented, partly| 00008a60 20 62 65 63 61 75 73 65 20 69 74 20 68 61 73 20 | because it has | 00008a70 73 6f 6d 65 20 73 65 72 69 6f 75 73 20 64 65 73 |some serious des| 00008a80 69 67 6e 20 66 6c 61 77 73 2e 20 20 49 74 20 69 |ign flaws. It i| 00008a90 73 0a 6c 69 6b 65 6c 79 20 74 68 61 74 20 74 68 |s.likely that th| 00008aa0 65 20 54 49 46 46 20 36 2e 30 20 4a 50 45 47 20 |e TIFF 6.0 JPEG | 00008ab0 73 65 63 74 69 6f 6e 20 77 69 6c 6c 20 62 65 20 |section will be | 00008ac0 63 68 61 6e 67 65 64 20 73 69 67 6e 69 66 69 63 |changed signific| 00008ad0 61 6e 74 6c 79 20 62 65 66 6f 72 65 0a 77 69 64 |antly before.wid| 00008ae0 65 73 70 72 65 61 64 20 61 64 6f 70 74 69 6f 6e |espread adoption| 00008af0 20 6f 63 63 75 72 73 2e 20 20 45 76 65 6e 20 77 | occurs. Even w| 00008b00 68 65 6e 20 54 49 46 46 2f 4a 50 45 47 20 69 73 |hen TIFF/JPEG is| 00008b10 20 77 65 6c 6c 20 64 65 66 69 6e 65 64 2c 20 74 | well defined, t| 00008b20 68 65 20 4a 46 49 46 0a 66 6f 72 6d 61 74 20 69 |he JFIF.format i| 00008b30 73 20 6c 69 6b 65 6c 79 20 74 6f 20 62 65 20 61 |s likely to be a| 00008b40 20 77 69 64 65 6c 79 20 73 75 70 70 6f 72 74 65 | widely supporte| 00008b50 64 20 22 6c 6f 77 65 73 74 20 63 6f 6d 6d 6f 6e |d "lowest common| 00008b60 20 64 65 6e 6f 6d 69 6e 61 74 6f 72 22 3b 0a 54 | denominator";.T| 00008b70 49 46 46 2f 4a 50 45 47 20 66 69 6c 65 73 20 6d |IFF/JPEG files m| 00008b80 61 79 20 6e 65 76 65 72 20 62 65 20 61 73 20 74 |ay never be as t| 00008b90 72 61 6e 73 70 6f 72 74 61 62 6c 65 20 61 73 20 |ransportable as | 00008ba0 4a 46 49 46 2e 0a 0a 41 20 70 61 72 74 69 63 75 |JFIF...A particu| 00008bb0 6c 61 72 20 63 61 73 65 20 6f 66 20 77 69 64 65 |lar case of wide| 00008bc0 20 69 6e 74 65 72 65 73 74 20 69 73 20 41 70 70 | interest is App| 00008bd0 6c 65 27 73 20 4d 61 63 69 6e 74 6f 73 68 20 51 |le's Macintosh Q| 00008be0 75 69 63 6b 54 69 6d 65 20 73 6f 66 74 77 61 72 |uickTime softwar| 00008bf0 65 2e 0a 51 75 69 63 6b 54 69 6d 65 20 75 73 65 |e..QuickTime use| 00008c00 73 20 61 20 4a 46 49 46 2d 63 6f 6d 70 61 74 69 |s a JFIF-compati| 00008c10 62 6c 65 20 66 6f 72 6d 61 74 20 77 72 61 70 70 |ble format wrapp| 00008c20 65 64 20 69 6e 73 69 64 65 20 74 68 65 20 4d 61 |ed inside the Ma| 00008c30 63 2d 73 70 65 63 69 66 69 63 20 50 49 43 54 0a |c-specific PICT.| 00008c40 73 74 72 75 63 74 75 72 65 2e 20 20 43 6f 6e 76 |structure. Conv| 00008c50 65 72 73 69 6f 6e 20 62 65 74 77 65 65 6e 20 4a |ersion between J| 00008c60 46 49 46 20 61 6e 64 20 50 49 43 54 2f 4a 50 45 |FIF and PICT/JPE| 00008c70 47 20 69 73 20 70 72 65 74 74 79 20 73 74 72 61 |G is pretty stra| 00008c80 69 67 68 74 66 6f 72 77 61 72 64 2c 0a 61 6e 64 |ightforward,.and| 00008c90 20 73 65 76 65 72 61 6c 20 4d 61 63 20 70 72 6f | several Mac pro| 00008ca0 67 72 61 6d 73 20 61 72 65 20 61 76 61 69 6c 61 |grams are availa| 00008cb0 62 6c 65 20 74 6f 20 64 6f 20 69 74 20 28 73 65 |ble to do it (se| 00008cc0 65 20 4d 61 63 20 70 6f 72 74 69 6f 6e 20 6f 66 |e Mac portion of| 00008cd0 20 70 61 72 74 20 32 29 2e 0a 49 66 20 79 6f 75 | part 2)..If you| 00008ce0 20 68 61 76 65 20 61 6e 20 65 64 69 74 6f 72 20 | have an editor | 00008cf0 74 68 61 74 20 68 61 6e 64 6c 65 73 20 62 69 6e |that handles bin| 00008d00 61 72 79 20 66 69 6c 65 73 2c 20 79 6f 75 20 63 |ary files, you c| 00008d10 61 6e 20 65 76 65 6e 20 73 74 72 69 70 20 61 0a |an even strip a.| 00008d20 50 49 43 54 2f 4a 50 45 47 20 66 69 6c 65 20 64 |PICT/JPEG file d| 00008d30 6f 77 6e 20 74 6f 20 4a 46 49 46 20 62 79 20 68 |own to JFIF by h| 00008d40 61 6e 64 3b 20 73 65 65 20 74 68 65 20 6e 65 78 |and; see the nex| 00008d50 74 20 73 65 63 74 69 6f 6e 20 66 6f 72 20 64 65 |t section for de| 00008d60 74 61 69 6c 73 2e 0a 0a 41 6e 6f 74 68 65 72 20 |tails...Another | 00008d70 70 61 72 74 69 63 75 6c 61 72 20 63 61 73 65 20 |particular case | 00008d80 69 73 20 48 61 6e 64 6d 61 64 65 20 53 6f 66 74 |is Handmade Soft| 00008d90 77 61 72 65 27 73 20 44 4f 53 20 70 72 6f 67 72 |ware's DOS progr| 00008da0 61 6d 73 20 28 47 49 46 32 4a 50 47 2f 4a 50 47 |ams (GIF2JPG/JPG| 00008db0 32 47 49 46 0a 61 6e 64 20 49 6d 61 67 65 20 41 |2GIF.and Image A| 00008dc0 6c 63 68 65 6d 79 29 2e 20 20 54 68 65 73 65 20 |lchemy). These | 00008dd0 70 72 6f 67 72 61 6d 73 20 61 72 65 20 63 61 70 |programs are cap| 00008de0 61 62 6c 65 20 6f 66 20 72 65 61 64 69 6e 67 20 |able of reading | 00008df0 61 6e 64 20 77 72 69 74 69 6e 67 20 4a 46 49 46 |and writing JFIF| 00008e00 0a 66 6f 72 6d 61 74 2e 20 20 42 79 20 64 65 66 |.format. By def| 00008e10 61 75 6c 74 2c 20 74 68 6f 75 67 68 2c 20 74 68 |ault, though, th| 00008e20 65 79 20 77 72 69 74 65 20 61 20 70 72 6f 70 72 |ey write a propr| 00008e30 69 65 74 61 72 79 20 66 6f 72 6d 61 74 20 64 65 |ietary format de| 00008e40 76 65 6c 6f 70 65 64 20 62 79 0a 48 53 49 2e 20 |veloped by.HSI. | 00008e50 20 54 68 69 73 20 66 6f 72 6d 61 74 20 69 73 20 | This format is | 00008e60 4e 4f 54 20 72 65 61 64 61 62 6c 65 20 62 79 20 |NOT readable by | 00008e70 61 6e 79 20 6e 6f 6e 2d 48 53 49 20 70 72 6f 67 |any non-HSI prog| 00008e80 72 61 6d 73 20 61 6e 64 20 73 68 6f 75 6c 64 20 |rams and should | 00008e90 6e 6f 74 20 62 65 0a 75 73 65 64 20 66 6f 72 20 |not be.used for | 00008ea0 55 73 65 6e 65 74 20 70 6f 73 74 69 6e 67 73 2e |Usenet postings.| 00008eb0 20 20 55 73 65 20 74 68 65 20 2d 6a 20 73 77 69 | Use the -j swi| 00008ec0 74 63 68 20 74 6f 20 67 65 74 20 4a 46 49 46 20 |tch to get JFIF | 00008ed0 6f 75 74 70 75 74 2e 20 20 28 54 68 69 73 0a 61 |output. (This.a| 00008ee0 70 70 6c 69 65 73 20 74 6f 20 6f 6c 64 20 76 65 |pplies to old ve| 00008ef0 72 73 69 6f 6e 73 20 6f 66 20 74 68 65 73 65 20 |rsions of these | 00008f00 70 72 6f 67 72 61 6d 73 3b 20 74 68 65 20 63 75 |programs; the cu| 00008f10 72 72 65 6e 74 20 72 65 6c 65 61 73 65 73 20 65 |rrent releases e| 00008f20 6d 69 74 20 4a 46 49 46 0a 66 6f 72 6d 61 74 20 |mit JFIF.format | 00008f30 62 79 20 64 65 66 61 75 6c 74 2e 20 20 59 6f 75 |by default. You| 00008f40 20 73 74 69 6c 6c 20 73 68 6f 75 6c 64 20 62 65 | still should be| 00008f50 20 63 61 72 65 66 75 6c 20 6e 6f 74 20 74 6f 20 | careful not to | 00008f60 70 6f 73 74 20 48 53 49 2d 66 6f 72 6d 61 74 0a |post HSI-format.| 00008f70 66 69 6c 65 73 2c 20 75 6e 6c 65 73 73 20 79 6f |files, unless yo| 00008f80 75 20 77 61 6e 74 20 74 6f 20 67 65 74 20 66 6c |u want to get fl| 00008f90 61 6d 65 64 20 62 79 20 70 65 6f 70 6c 65 20 6f |amed by people o| 00008fa0 6e 20 6e 6f 6e 2d 50 43 20 70 6c 61 74 66 6f 72 |n non-PC platfor| 00008fb0 6d 73 2e 29 0a 0a 4e 65 77 73 20 66 6c 61 73 68 |ms.)..News flash| 00008fc0 3a 20 74 68 65 20 49 53 4f 20 4a 50 45 47 20 63 |: the ISO JPEG c| 00008fd0 6f 6d 6d 69 74 74 65 65 20 73 65 65 6d 73 20 74 |ommittee seems t| 00008fe0 6f 20 68 61 76 65 20 77 6f 6e 20 74 68 65 69 72 |o have won their| 00008ff0 20 74 75 72 66 20 77 61 72 73 2e 20 20 54 68 65 | turf wars. The| 00009000 79 0a 77 69 6c 6c 20 64 65 66 69 6e 65 20 61 20 |y.will define a | 00009010 63 6f 6d 70 6c 65 74 65 20 66 69 6c 65 20 66 6f |complete file fo| 00009020 72 6d 61 74 20 73 70 65 63 20 63 61 6c 6c 65 64 |rmat spec called| 00009030 20 22 53 50 49 46 46 22 20 69 6e 20 74 68 65 20 | "SPIFF" in the | 00009040 6e 65 78 74 20 76 65 72 73 69 6f 6e 0a 6f 66 20 |next version.of | 00009050 74 68 65 20 4a 50 45 47 20 73 74 61 6e 64 61 72 |the JPEG standar| 00009060 64 2e 20 20 49 74 27 73 20 70 72 65 74 74 79 20 |d. It's pretty | 00009070 6c 61 74 65 20 69 6e 20 74 68 65 20 67 61 6d 65 |late in the game| 00009080 20 74 68 6f 75 67 68 2c 20 73 6f 20 77 68 65 74 | though, so whet| 00009090 68 65 72 20 74 68 69 73 0a 77 69 6c 6c 20 68 61 |her this.will ha| 000090a0 76 65 20 6d 75 63 68 20 69 6d 70 61 63 74 20 6f |ve much impact o| 000090b0 6e 20 72 65 61 6c 2d 77 6f 72 6c 64 20 66 69 6c |n real-world fil| 000090c0 65 73 20 72 65 6d 61 69 6e 73 20 74 6f 20 62 65 |es remains to be| 000090d0 20 73 65 65 6e 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d | seen...--------| 000090e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 000090f0 2d 2d 2d 2d 2d 2d 0a 0a 53 75 62 6a 65 63 74 3a |------..Subject:| 00009100 20 5b 31 34 5d 20 48 6f 77 20 64 6f 20 49 20 72 | [14] How do I r| 00009110 65 63 6f 67 6e 69 7a 65 20 77 68 69 63 68 20 66 |ecognize which f| 00009120 69 6c 65 20 66 6f 72 6d 61 74 20 49 20 68 61 76 |ile format I hav| 00009130 65 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |e,. | 00009140 20 61 6e 64 20 77 68 61 74 20 64 6f 20 49 20 64 | and what do I d| 00009150 6f 20 61 62 6f 75 74 20 69 74 3f 0a 0a 49 66 20 |o about it?..If | 00009160 79 6f 75 20 68 61 76 65 20 61 6e 20 61 6c 6c 65 |you have an alle| 00009170 67 65 64 20 4a 50 45 47 20 66 69 6c 65 20 74 68 |ged JPEG file th| 00009180 61 74 20 79 6f 75 72 20 73 6f 66 74 77 61 72 65 |at your software| 00009190 20 77 6f 6e 27 74 20 72 65 61 64 2c 20 69 74 27 | won't read, it'| 000091a0 73 20 6c 69 6b 65 6c 79 0a 74 6f 20 62 65 20 48 |s likely.to be H| 000091b0 53 49 20 66 6f 72 6d 61 74 20 6f 72 20 73 6f 6d |SI format or som| 000091c0 65 20 6f 74 68 65 72 20 70 72 6f 70 72 69 65 74 |e other propriet| 000091d0 61 72 79 20 4a 50 45 47 2d 62 61 73 65 64 20 66 |ary JPEG-based f| 000091e0 6f 72 6d 61 74 2e 20 20 59 6f 75 20 63 61 6e 20 |ormat. You can | 000091f0 74 65 6c 6c 0a 77 68 61 74 20 79 6f 75 20 68 61 |tell.what you ha| 00009200 76 65 20 62 79 20 69 6e 73 70 65 63 74 69 6e 67 |ve by inspecting| 00009210 20 74 68 65 20 66 69 72 73 74 20 66 65 77 20 62 | the first few b| 00009220 79 74 65 73 20 6f 66 20 74 68 65 20 66 69 6c 65 |ytes of the file| 00009230 3a 0a 0a 31 2e 20 20 41 20 4a 46 49 46 2d 73 74 |:..1. A JFIF-st| 00009240 61 6e 64 61 72 64 20 66 69 6c 65 20 77 69 6c 6c |andard file will| 00009250 20 73 74 61 72 74 20 77 69 74 68 20 74 68 65 20 | start with the | 00009260 66 6f 75 72 20 62 79 74 65 73 20 28 68 65 78 29 |four bytes (hex)| 00009270 20 46 46 20 44 38 20 46 46 20 45 30 2c 0a 20 20 | FF D8 FF E0,. | 00009280 20 20 66 6f 6c 6c 6f 77 65 64 20 62 79 20 74 77 | followed by tw| 00009290 6f 20 76 61 72 69 61 62 6c 65 20 62 79 74 65 73 |o variable bytes| 000092a0 20 28 6f 66 74 65 6e 20 68 65 78 20 30 30 20 31 | (often hex 00 1| 000092b0 30 29 2c 20 66 6f 6c 6c 6f 77 65 64 20 62 79 20 |0), followed by | 000092c0 27 4a 46 49 46 27 2e 0a 0a 32 2e 20 20 49 66 20 |'JFIF'...2. If | 000092d0 79 6f 75 20 73 65 65 20 46 46 20 44 38 20 61 74 |you see FF D8 at| 000092e0 20 74 68 65 20 73 74 61 72 74 2c 20 62 75 74 20 | the start, but | 000092f0 6e 6f 74 20 74 68 65 20 27 4a 46 49 46 27 20 6d |not the 'JFIF' m| 00009300 61 72 6b 65 72 2c 20 79 6f 75 20 6d 61 79 20 68 |arker, you may h| 00009310 61 76 65 20 61 0a 20 20 20 20 22 72 61 77 20 4a |ave a. "raw J| 00009320 50 45 47 22 20 66 69 6c 65 2e 20 20 54 68 69 73 |PEG" file. This| 00009330 20 69 73 20 70 72 6f 62 61 62 6c 79 20 64 65 63 | is probably dec| 00009340 6f 64 61 62 6c 65 20 61 73 2d 69 73 20 62 79 20 |odable as-is by | 00009350 4a 46 49 46 20 73 6f 66 74 77 61 72 65 20 2d 2d |JFIF software --| 00009360 2d 0a 20 20 20 20 69 74 27 73 20 77 6f 72 74 68 |-. it's worth| 00009370 20 61 20 74 72 79 2c 20 61 6e 79 77 61 79 2e 0a | a try, anyway..| 00009380 0a 33 2e 20 20 48 53 49 20 66 69 6c 65 73 20 73 |.3. HSI files s| 00009390 74 61 72 74 20 77 69 74 68 20 27 68 73 69 31 27 |tart with 'hsi1'| 000093a0 2e 20 20 59 6f 75 27 72 65 20 6f 75 74 20 6f 66 |. You're out of| 000093b0 20 6c 75 63 6b 20 75 6e 6c 65 73 73 20 79 6f 75 | luck unless you| 000093c0 20 68 61 76 65 20 48 53 49 0a 20 20 20 20 73 6f | have HSI. so| 000093d0 66 74 77 61 72 65 2e 20 20 50 6f 72 74 69 6f 6e |ftware. Portion| 000093e0 73 20 6f 66 20 74 68 65 20 66 69 6c 65 20 6d 61 |s of the file ma| 000093f0 79 20 6c 6f 6f 6b 20 6c 69 6b 65 20 70 6c 61 69 |y look like plai| 00009400 6e 20 4a 50 45 47 20 64 61 74 61 2c 20 62 75 74 |n JPEG data, but| 00009410 20 74 68 65 79 0a 20 20 20 20 75 73 75 61 6c 6c | they. usuall| 00009420 79 20 77 6f 6e 27 74 20 64 65 63 6f 6d 70 72 65 |y won't decompre| 00009430 73 73 20 70 72 6f 70 65 72 6c 79 20 77 69 74 68 |ss properly with| 00009440 20 6e 6f 6e 2d 48 53 49 20 70 72 6f 67 72 61 6d | non-HSI program| 00009450 73 2e 0a 0a 34 2e 20 20 41 20 4d 61 63 69 6e 74 |s...4. A Macint| 00009460 6f 73 68 20 50 49 43 54 20 66 69 6c 65 2c 20 69 |osh PICT file, i| 00009470 66 20 4a 50 45 47 2d 63 6f 6d 70 72 65 73 73 65 |f JPEG-compresse| 00009480 64 2c 20 77 69 6c 6c 20 68 61 76 65 20 73 65 76 |d, will have sev| 00009490 65 72 61 6c 20 68 75 6e 64 72 65 64 0a 20 20 20 |eral hundred. | 000094a0 20 62 79 74 65 73 20 6f 66 20 68 65 61 64 65 72 | bytes of header| 000094b0 20 28 6f 66 74 65 6e 20 37 32 36 20 62 79 74 65 | (often 726 byte| 000094c0 73 2c 20 62 75 74 20 6e 6f 74 20 61 6c 77 61 79 |s, but not alway| 000094d0 73 29 20 66 6f 6c 6c 6f 77 65 64 20 62 79 20 4a |s) followed by J| 000094e0 50 45 47 20 64 61 74 61 2e 0a 20 20 20 20 4c 6f |PEG data.. Lo| 000094f0 6f 6b 20 66 6f 72 20 74 68 65 20 33 2d 62 79 74 |ok for the 3-byt| 00009500 65 20 73 65 71 75 65 6e 63 65 20 28 68 65 78 29 |e sequence (hex)| 00009510 20 46 46 20 44 38 20 46 46 2e 20 20 54 68 65 20 | FF D8 FF. The | 00009520 74 65 78 74 20 27 50 68 6f 74 6f 20 2d 20 4a 50 |text 'Photo - JP| 00009530 45 47 27 0a 20 20 20 20 77 69 6c 6c 20 75 73 75 |EG'. will usu| 00009540 61 6c 6c 79 20 61 70 70 65 61 72 20 73 68 6f 72 |ally appear shor| 00009550 74 6c 79 20 62 65 66 6f 72 65 20 74 68 69 73 20 |tly before this | 00009560 68 65 61 64 65 72 2c 20 61 6e 64 20 27 41 70 70 |header, and 'App| 00009570 6c 65 4d 61 72 6b 27 20 6f 72 0a 20 20 20 20 27 |leMark' or. '| 00009580 4a 46 49 46 27 20 77 69 6c 6c 20 75 73 75 61 6c |JFIF' will usual| 00009590 6c 79 20 61 70 70 65 61 72 20 73 68 6f 72 74 6c |ly appear shortl| 000095a0 79 20 61 66 74 65 72 20 69 74 2e 20 20 53 74 72 |y after it. Str| 000095b0 69 70 20 6f 66 66 20 65 76 65 72 79 74 68 69 6e |ip off everythin| 000095c0 67 0a 20 20 20 20 62 65 66 6f 72 65 20 74 68 65 |g. before the| 000095d0 20 46 46 20 44 38 20 46 46 20 61 6e 64 20 79 6f | FF D8 FF and yo| 000095e0 75 20 77 69 6c 6c 20 75 73 75 61 6c 6c 79 20 62 |u will usually b| 000095f0 65 20 61 62 6c 65 20 74 6f 20 64 65 63 6f 64 65 |e able to decode| 00009600 20 74 68 65 20 66 69 6c 65 2e 0a 20 20 20 20 28 | the file.. (| 00009610 54 68 69 73 20 77 69 6c 6c 20 66 61 69 6c 20 69 |This will fail i| 00009620 66 20 74 68 65 20 50 49 43 54 20 69 6d 61 67 65 |f the PICT image| 00009630 20 69 73 20 64 69 76 69 64 65 64 20 69 6e 74 6f | is divided into| 00009640 20 6d 75 6c 74 69 70 6c 65 20 22 62 61 6e 64 73 | multiple "bands| 00009650 22 2c 0a 20 20 20 20 62 75 74 20 74 68 61 74 20 |",. but that | 00009660 69 73 20 75 6e 63 6f 6d 6d 6f 6e 2e 29 0a 0a 35 |is uncommon.)..5| 00009670 2e 20 20 49 66 20 74 68 65 20 66 69 6c 65 20 63 |. If the file c| 00009680 61 6d 65 20 66 72 6f 6d 20 61 20 4d 61 63 69 6e |ame from a Macin| 00009690 74 6f 73 68 2c 20 69 74 20 63 6f 75 6c 64 20 61 |tosh, it could a| 000096a0 6c 73 6f 20 62 65 20 61 20 73 74 61 6e 64 61 72 |lso be a standar| 000096b0 64 20 4a 46 49 46 0a 20 20 20 20 66 69 6c 65 20 |d JFIF. file | 000096c0 77 69 74 68 20 61 20 4d 61 63 42 69 6e 61 72 79 |with a MacBinary| 000096d0 20 68 65 61 64 65 72 20 61 74 74 61 63 68 65 64 | header attached| 000096e0 2e 20 20 49 6e 20 74 68 69 73 20 63 61 73 65 2c |. In this case,| 000096f0 20 74 68 65 20 4a 46 49 46 20 68 65 61 64 65 72 | the JFIF header| 00009700 0a 20 20 20 20 77 69 6c 6c 20 61 70 70 65 61 72 |. will appear| 00009710 20 31 32 38 20 62 79 74 65 73 20 69 6e 74 6f 20 | 128 bytes into | 00009720 74 68 65 20 66 69 6c 65 2e 20 20 47 65 74 20 72 |the file. Get r| 00009730 69 64 20 6f 66 20 74 68 65 20 66 69 72 73 74 20 |id of the first | 00009740 31 32 38 20 62 79 74 65 73 0a 20 20 20 20 61 6e |128 bytes. an| 00009750 64 20 79 6f 75 27 72 65 20 73 65 74 2e 0a 0a 36 |d you're set...6| 00009760 2e 20 20 41 6e 79 74 68 69 6e 67 20 65 6c 73 65 |. Anything else| 00009770 3a 20 69 74 27 73 20 61 20 70 72 6f 70 72 69 65 |: it's a proprie| 00009780 74 61 72 79 20 66 6f 72 6d 61 74 2c 20 6f 72 20 |tary format, or | 00009790 6e 6f 74 20 4a 50 45 47 20 61 74 20 61 6c 6c 2e |not JPEG at all.| 000097a0 20 20 49 66 20 79 6f 75 0a 20 20 20 20 61 72 65 | If you. are| 000097b0 20 6c 75 63 6b 79 2c 20 74 68 65 20 66 69 6c 65 | lucky, the file| 000097c0 20 6d 61 79 20 63 6f 6e 73 69 73 74 20 6f 66 20 | may consist of | 000097d0 61 20 68 65 61 64 65 72 20 61 6e 64 20 61 20 72 |a header and a r| 000097e0 61 77 20 4a 50 45 47 20 64 61 74 61 20 73 74 72 |aw JPEG data str| 000097f0 65 61 6d 2e 0a 20 20 20 20 49 66 20 79 6f 75 20 |eam.. If you | 00009800 63 61 6e 20 69 64 65 6e 74 69 66 79 20 74 68 65 |can identify the| 00009810 20 73 74 61 72 74 20 6f 66 20 74 68 65 20 4a 50 | start of the JP| 00009820 45 47 20 64 61 74 61 20 73 74 72 65 61 6d 20 28 |EG data stream (| 00009830 6c 6f 6f 6b 20 66 6f 72 20 46 46 20 44 38 29 2c |look for FF D8),| 00009840 0a 20 20 20 20 74 72 79 20 73 74 72 69 70 70 69 |. try strippi| 00009850 6e 67 20 6f 66 66 20 65 76 65 72 79 74 68 69 6e |ng off everythin| 00009860 67 20 62 65 66 6f 72 65 20 74 68 61 74 2e 0a 0a |g before that...| 00009870 48 53 49 20 66 69 6c 65 73 20 75 73 65 64 20 74 |HSI files used t| 00009880 6f 20 62 65 20 72 61 74 68 65 72 20 63 6f 6d 6d |o be rather comm| 00009890 6f 6e 20 69 6e 20 61 6c 74 2e 62 69 6e 61 72 69 |on in alt.binari| 000098a0 65 73 2e 70 69 63 74 75 72 65 73 2e 2a 20 70 6f |es.pictures.* po| 000098b0 73 74 69 6e 67 73 2c 0a 61 6c 74 68 6f 75 67 68 |stings,.although| 000098c0 20 74 68 61 6e 6b 66 75 6c 6c 79 20 74 68 65 79 | thankfully they| 000098d0 20 68 61 76 65 20 67 6f 74 74 65 6e 20 6c 65 73 | have gotten les| 000098e0 73 20 73 6f 2e 20 20 59 6f 75 20 63 61 6e 20 73 |s so. You can s| 000098f0 70 6f 74 20 61 6e 20 48 53 49 20 70 6f 73 74 69 |pot an HSI posti| 00009900 6e 67 0a 62 79 20 6c 6f 6f 6b 69 6e 67 20 61 74 |ng.by looking at| 00009910 20 74 68 65 20 66 69 72 73 74 20 66 65 77 20 63 | the first few c| 00009920 68 61 72 61 63 74 65 72 73 20 6f 66 20 74 68 65 |haracters of the| 00009930 20 75 75 65 6e 63 6f 64 65 64 20 64 61 74 61 2e | uuencoded data.| 00009940 20 20 54 68 65 0a 63 68 61 72 61 63 74 65 72 69 | The.characteri| 00009950 73 74 69 63 20 48 53 49 20 70 61 74 74 65 72 6e |stic HSI pattern| 00009960 20 69 73 0a 09 22 62 65 67 69 6e 22 20 6c 69 6e | is.."begin" lin| 00009970 65 0a 09 4d 3a 27 2d 49 20 2e 2e 2e 0a 77 68 65 |e..M:'-I ....whe| 00009980 72 65 61 73 20 73 74 61 6e 64 61 72 64 20 4a 46 |reas standard JF| 00009990 49 46 20 66 69 6c 65 73 20 62 65 67 69 6e 20 77 |IF files begin w| 000099a0 69 74 68 0a 09 22 62 65 67 69 6e 22 20 6c 69 6e |ith.."begin" lin| 000099b0 65 0a 09 4d 5f 5d 43 5f 58 20 2e 2e 2e 0a 49 66 |e..M_]C_X ....If| 000099c0 20 79 6f 75 20 6c 65 61 72 6e 20 74 6f 20 73 70 | you learn to sp| 000099d0 6f 74 20 74 68 65 20 48 53 49 20 70 61 74 74 65 |ot the HSI patte| 000099e0 72 6e 2c 20 79 6f 75 20 63 61 6e 20 73 61 76 65 |rn, you can save| 000099f0 20 79 6f 75 72 73 65 6c 66 20 74 68 65 20 74 72 | yourself the tr| 00009a00 6f 75 62 6c 65 0a 6f 66 20 64 6f 77 6e 6c 6f 61 |ouble.of downloa| 00009a10 64 69 6e 67 20 75 6e 75 73 61 62 6c 65 20 66 69 |ding unusable fi| 00009a20 6c 65 73 2e 0a 0a 41 74 20 6c 65 61 73 74 20 6f |les...At least o| 00009a30 6e 65 20 72 65 6c 65 61 73 65 20 6f 66 20 48 69 |ne release of Hi| 00009a40 6a 61 61 6b 20 50 72 6f 20 77 72 69 74 65 73 20 |jaak Pro writes | 00009a50 4a 46 49 46 20 66 69 6c 65 73 20 74 68 61 74 20 |JFIF files that | 00009a60 63 6c 61 69 6d 20 74 6f 20 62 65 0a 72 65 76 69 |claim to be.revi| 00009a70 73 69 6f 6e 20 32 2e 30 31 2e 20 20 54 68 65 72 |sion 2.01. Ther| 00009a80 65 20 69 73 20 6e 6f 20 73 75 63 68 20 73 70 65 |e is no such spe| 00009a90 63 3b 20 74 68 65 20 6c 61 74 65 73 74 20 4a 46 |c; the latest JF| 00009aa0 49 46 20 72 65 76 69 73 69 6f 6e 20 69 73 20 31 |IF revision is 1| 00009ab0 2e 30 32 2e 0a 49 74 20 6c 6f 6f 6b 73 20 6c 69 |.02..It looks li| 00009ac0 6b 65 20 48 69 4a 61 61 6b 20 67 6f 74 20 74 68 |ke HiJaak got th| 00009ad0 65 20 68 69 67 68 20 61 6e 64 20 6c 6f 77 20 62 |e high and low b| 00009ae0 79 74 65 73 20 62 61 63 6b 77 61 72 64 73 2e 20 |ytes backwards. | 00009af0 20 55 6e 66 6f 72 74 75 6e 61 74 65 6c 79 2c 0a | Unfortunately,.| 00009b00 6d 6f 73 74 20 4a 46 49 46 20 72 65 61 64 65 72 |most JFIF reader| 00009b10 73 20 77 69 6c 6c 20 67 69 76 65 20 75 70 20 6f |s will give up o| 00009b20 6e 20 65 6e 63 6f 75 6e 74 65 72 69 6e 67 20 74 |n encountering t| 00009b30 68 65 73 65 20 66 69 6c 65 73 2c 20 62 65 63 61 |hese files, beca| 00009b40 75 73 65 20 74 68 65 20 4a 46 49 46 0a 73 70 65 |use the JFIF.spe| 00009b50 63 20 64 65 66 69 6e 65 73 20 61 20 6d 61 6a 6f |c defines a majo| 00009b60 72 20 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 |r version number| 00009b70 20 63 68 61 6e 67 65 20 74 6f 20 6d 65 61 6e 20 | change to mean | 00009b80 61 6e 20 69 6e 63 6f 6d 70 61 74 69 62 6c 65 20 |an incompatible | 00009b90 66 6f 72 6d 61 74 0a 63 68 61 6e 67 65 2e 20 20 |format.change. | 00009ba0 49 66 20 74 68 65 72 65 20 65 76 65 72 20 2a 77 |If there ever *w| 00009bb0 65 72 65 2a 20 61 20 76 65 72 73 69 6f 6e 20 32 |ere* a version 2| 00009bc0 2e 30 31 2c 20 69 74 20 77 6f 75 6c 64 20 62 65 |.01, it would be| 00009bd0 20 73 6f 20 6e 75 6d 62 65 72 65 64 0a 62 65 63 | so numbered.bec| 00009be0 61 75 73 65 20 63 75 72 72 65 6e 74 20 73 6f 66 |ause current sof| 00009bf0 74 77 61 72 65 20 63 6f 75 6c 64 20 6e 6f 74 20 |tware could not | 00009c00 72 65 61 64 20 69 74 20 61 6e 64 20 73 68 6f 75 |read it and shou| 00009c10 6c 64 20 6e 6f 74 20 74 72 79 2e 20 20 28 4f 6e |ld not try. (On| 00009c20 65 20 77 6f 6e 64 65 72 73 0a 69 66 20 48 69 6a |e wonders.if Hij| 00009c30 61 61 6b 20 68 61 73 20 65 76 65 72 20 68 65 61 |aak has ever hea| 00009c40 72 64 20 6f 66 20 63 72 6f 73 73 2d 74 65 73 74 |rd of cross-test| 00009c50 69 6e 67 20 77 69 74 68 20 6f 74 68 65 72 20 70 |ing with other p| 00009c60 65 6f 70 6c 65 27 73 20 73 6f 66 74 77 61 72 65 |eople's software| 00009c70 2e 29 0a 49 66 20 79 6f 75 20 72 75 6e 20 69 6e |.).If you run in| 00009c80 74 6f 20 6f 6e 65 20 6f 66 20 74 68 65 73 65 20 |to one of these | 00009c90 6d 69 73 6e 75 6d 62 65 72 65 64 20 66 69 6c 65 |misnumbered file| 00009ca0 73 2c 20 79 6f 75 20 63 61 6e 20 66 69 78 20 69 |s, you can fix i| 00009cb0 74 20 77 69 74 68 20 61 0a 62 69 6e 61 72 79 2d |t with a.binary-| 00009cc0 66 69 6c 65 20 65 64 69 74 6f 72 2c 20 62 79 20 |file editor, by | 00009cd0 63 68 61 6e 67 69 6e 67 20 74 68 65 20 74 77 65 |changing the twe| 00009ce0 6c 66 74 68 20 62 79 74 65 20 6f 66 20 74 68 65 |lfth byte of the| 00009cf0 20 66 69 6c 65 20 66 72 6f 6d 20 32 20 74 6f 20 | file from 2 to | 00009d00 31 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |1...------------| 00009d10 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00009d20 2d 2d 0a 0a 53 75 62 6a 65 63 74 3a 20 5b 31 35 |--..Subject: [15| 00009d30 5d 20 48 6f 77 20 64 6f 65 73 20 4a 50 45 47 20 |] How does JPEG | 00009d40 77 6f 72 6b 3f 0a 0a 59 6f 75 20 63 61 6e 20 66 |work?..You can f| 00009d50 69 6e 64 20 61 6e 20 69 6e 74 72 6f 64 75 63 74 |ind an introduct| 00009d60 69 6f 6e 20 61 6e 64 20 72 65 66 65 72 65 6e 63 |ion and referenc| 00009d70 65 73 20 66 6f 72 20 66 75 72 74 68 65 72 20 72 |es for further r| 00009d80 65 61 64 69 6e 67 20 69 6e 20 74 68 65 0a 63 6f |eading in the.co| 00009d90 6d 70 2e 63 6f 6d 70 72 65 73 73 69 6f 6e 20 46 |mp.compression F| 00009da0 41 51 2c 20 77 68 69 63 68 20 69 73 20 61 76 61 |AQ, which is ava| 00009db0 69 6c 61 62 6c 65 20 66 72 6f 6d 20 74 68 65 20 |ilable from the | 00009dc0 6e 65 77 73 2e 61 6e 73 77 65 72 73 20 61 72 63 |news.answers arc| 00009dd0 68 69 76 65 20 61 74 0a 72 74 66 6d 2e 6d 69 74 |hive at.rtfm.mit| 00009de0 2e 65 64 75 2c 20 69 6e 20 66 69 6c 65 73 20 2f |.edu, in files /| 00009df0 70 75 62 2f 75 73 65 6e 65 74 2f 6e 65 77 73 2e |pub/usenet/news.| 00009e00 61 6e 73 77 65 72 73 2f 63 6f 6d 70 72 65 73 73 |answers/compress| 00009e10 69 6f 6e 2d 66 61 71 2f 70 61 72 74 5b 31 2d 33 |ion-faq/part[1-3| 00009e20 5d 0a 28 73 65 65 20 61 6c 73 6f 20 22 5b 32 30 |].(see also "[20| 00009e30 5d 20 57 68 65 72 65 20 61 72 65 20 46 41 51 20 |] Where are FAQ | 00009e40 6c 69 73 74 73 20 61 72 63 68 69 76 65 64 3f 22 |lists archived?"| 00009e50 29 2e 0a 0a 54 68 65 20 63 6f 6d 70 2e 63 6f 6d |)...The comp.com| 00009e60 70 72 65 73 73 69 6f 6e 20 46 41 51 20 69 73 20 |pression FAQ is | 00009e70 61 6c 73 6f 20 61 20 67 6f 6f 64 20 73 74 61 72 |also a good star| 00009e80 74 69 6e 67 20 70 6f 69 6e 74 20 66 6f 72 20 69 |ting point for i| 00009e90 6e 66 6f 72 6d 61 74 69 6f 6e 20 6f 6e 0a 6f 74 |nformation on.ot| 00009ea0 68 65 72 20 73 74 61 74 65 2d 6f 66 2d 74 68 65 |her state-of-the| 00009eb0 2d 61 72 74 20 69 6d 61 67 65 20 63 6f 6d 70 72 |-art image compr| 00009ec0 65 73 73 69 6f 6e 20 6d 65 74 68 6f 64 73 2c 20 |ession methods, | 00009ed0 73 75 63 68 20 61 73 20 77 61 76 65 6c 65 74 73 |such as wavelets| 00009ee0 20 61 6e 64 0a 66 72 61 63 74 61 6c 73 2e 20 20 | and.fractals. | 00009ef0 41 20 71 75 69 63 6b 20 63 6f 6d 70 61 72 69 73 |A quick comparis| 00009f00 6f 6e 3a 20 77 61 76 65 6c 65 74 73 20 61 72 65 |on: wavelets are| 00009f10 20 6c 69 6b 65 6c 79 20 74 6f 20 62 65 20 74 68 | likely to be th| 00009f20 65 20 62 61 73 69 73 20 6f 66 20 74 68 65 0a 6e |e basis of the.n| 00009f30 65 78 74 20 67 65 6e 65 72 61 74 69 6f 6e 20 6f |ext generation o| 00009f40 66 20 69 6d 61 67 65 2d 63 6f 6d 70 72 65 73 73 |f image-compress| 00009f50 69 6f 6e 20 73 74 61 6e 64 61 72 64 73 2c 20 62 |ion standards, b| 00009f60 75 74 20 74 68 65 79 20 61 72 65 20 70 65 72 68 |ut they are perh| 00009f70 61 70 73 20 31 30 0a 79 65 61 72 73 20 62 65 68 |aps 10.years beh| 00009f80 69 6e 64 20 4a 50 45 47 20 69 6e 20 74 68 65 20 |ind JPEG in the | 00009f90 73 74 61 6e 64 61 72 64 69 7a 61 74 69 6f 6e 20 |standardization | 00009fa0 70 69 70 65 6c 69 6e 65 2e 20 20 46 72 61 63 74 |pipeline. Fract| 00009fb0 61 6c 73 20 68 61 76 65 20 62 65 65 6e 0a 74 65 |als have been.te| 00009fc0 72 72 69 62 6c 79 20 6f 76 65 72 2d 68 79 70 65 |rribly over-hype| 00009fd0 64 20 62 79 20 74 68 65 69 72 20 63 68 69 65 66 |d by their chief| 00009fe0 20 63 6f 6d 6d 65 72 63 69 61 6c 20 70 72 6f 70 | commercial prop| 00009ff0 6f 6e 65 6e 74 2c 20 61 6e 64 20 69 74 27 73 20 |onent, and it's | 0000a000 64 69 66 66 69 63 75 6c 74 0a 74 6f 20 73 61 79 |difficult.to say| 0000a010 20 77 68 61 74 20 74 68 65 69 72 20 74 72 75 65 | what their true| 0000a020 20 63 61 70 61 62 69 6c 69 74 69 65 73 20 61 72 | capabilities ar| 0000a030 65 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |e...------------| 0000a040 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 0000a050 2d 2d 0a 0a 53 75 62 6a 65 63 74 3a 20 5b 31 36 |--..Subject: [16| 0000a060 5d 20 57 68 61 74 20 61 62 6f 75 74 20 61 72 69 |] What about ari| 0000a070 74 68 6d 65 74 69 63 20 63 6f 64 69 6e 67 3f 0a |thmetic coding?.| 0000a080 0a 54 68 65 20 4a 50 45 47 20 73 70 65 63 20 64 |.The JPEG spec d| 0000a090 65 66 69 6e 65 73 20 74 77 6f 20 64 69 66 66 65 |efines two diffe| 0000a0a0 72 65 6e 74 20 22 62 61 63 6b 20 65 6e 64 22 20 |rent "back end" | 0000a0b0 6d 6f 64 75 6c 65 73 20 66 6f 72 20 74 68 65 20 |modules for the | 0000a0c0 66 69 6e 61 6c 20 6f 75 74 70 75 74 0a 6f 66 20 |final output.of | 0000a0d0 63 6f 6d 70 72 65 73 73 65 64 20 64 61 74 61 3a |compressed data:| 0000a0e0 20 65 69 74 68 65 72 20 48 75 66 66 6d 61 6e 20 | either Huffman | 0000a0f0 63 6f 64 69 6e 67 20 6f 72 20 61 72 69 74 68 6d |coding or arithm| 0000a100 65 74 69 63 20 63 6f 64 69 6e 67 20 69 73 20 61 |etic coding is a| 0000a110 6c 6c 6f 77 65 64 2e 0a 54 68 65 20 63 68 6f 69 |llowed..The choi| 0000a120 63 65 20 68 61 73 20 6e 6f 20 69 6d 70 61 63 74 |ce has no impact| 0000a130 20 6f 6e 20 69 6d 61 67 65 20 71 75 61 6c 69 74 | on image qualit| 0000a140 79 2c 20 62 75 74 20 61 72 69 74 68 6d 65 74 69 |y, but arithmeti| 0000a150 63 20 63 6f 64 69 6e 67 20 75 73 75 61 6c 6c 79 |c coding usually| 0000a160 0a 70 72 6f 64 75 63 65 73 20 61 20 73 6d 61 6c |.produces a smal| 0000a170 6c 65 72 20 63 6f 6d 70 72 65 73 73 65 64 20 66 |ler compressed f| 0000a180 69 6c 65 2e 20 20 4f 6e 20 74 79 70 69 63 61 6c |ile. On typical| 0000a190 20 69 6d 61 67 65 73 2c 20 61 72 69 74 68 6d 65 | images, arithme| 0000a1a0 74 69 63 20 63 6f 64 69 6e 67 0a 70 72 6f 64 75 |tic coding.produ| 0000a1b0 63 65 73 20 61 20 66 69 6c 65 20 35 20 74 6f 20 |ces a file 5 to | 0000a1c0 31 30 20 70 65 72 63 65 6e 74 20 73 6d 61 6c 6c |10 percent small| 0000a1d0 65 72 20 74 68 61 6e 20 48 75 66 66 6d 61 6e 20 |er than Huffman | 0000a1e0 63 6f 64 69 6e 67 2e 20 20 28 41 6c 6c 20 74 68 |coding. (All th| 0000a1f0 65 0a 66 69 6c 65 2d 73 69 7a 65 20 6e 75 6d 62 |e.file-size numb| 0000a200 65 72 73 20 70 72 65 76 69 6f 75 73 6c 79 20 63 |ers previously c| 0000a210 69 74 65 64 20 61 72 65 20 66 6f 72 20 48 75 66 |ited are for Huf| 0000a220 66 6d 61 6e 20 63 6f 64 69 6e 67 2e 29 0a 0a 55 |fman coding.)..U| 0000a230 6e 66 6f 72 74 75 6e 61 74 65 6c 79 2c 20 74 68 |nfortunately, th| 0000a240 65 20 70 61 72 74 69 63 75 6c 61 72 20 76 61 72 |e particular var| 0000a250 69 61 6e 74 20 6f 66 20 61 72 69 74 68 6d 65 74 |iant of arithmet| 0000a260 69 63 20 63 6f 64 69 6e 67 20 73 70 65 63 69 66 |ic coding specif| 0000a270 69 65 64 20 62 79 20 74 68 65 0a 4a 50 45 47 20 |ied by the.JPEG | 0000a280 73 74 61 6e 64 61 72 64 20 69 73 20 73 75 62 6a |standard is subj| 0000a290 65 63 74 20 74 6f 20 70 61 74 65 6e 74 73 20 6f |ect to patents o| 0000a2a0 77 6e 65 64 20 62 79 20 49 42 4d 2c 20 41 54 26 |wned by IBM, AT&| 0000a2b0 54 2c 20 61 6e 64 20 4d 69 74 73 75 62 69 73 68 |T, and Mitsubish| 0000a2c0 69 2e 0a 54 68 75 73 20 2a 79 6f 75 20 63 61 6e |i..Thus *you can| 0000a2d0 6e 6f 74 20 6c 65 67 61 6c 6c 79 20 75 73 65 20 |not legally use | 0000a2e0 4a 50 45 47 20 61 72 69 74 68 6d 65 74 69 63 20 |JPEG arithmetic | 0000a2f0 63 6f 64 69 6e 67 2a 20 75 6e 6c 65 73 73 20 79 |coding* unless y| 0000a300 6f 75 20 6f 62 74 61 69 6e 0a 6c 69 63 65 6e 73 |ou obtain.licens| 0000a310 65 73 20 66 72 6f 6d 20 74 68 65 73 65 20 63 6f |es from these co| 0000a320 6d 70 61 6e 69 65 73 2e 20 20 28 50 61 74 65 6e |mpanies. (Paten| 0000a330 74 20 6c 61 77 27 73 20 22 65 78 70 65 72 69 6d |t law's "experim| 0000a340 65 6e 74 61 6c 20 75 73 65 22 20 65 78 63 65 70 |ental use" excep| 0000a350 74 69 6f 6e 0a 61 6c 6c 6f 77 73 20 70 65 6f 70 |tion.allows peop| 0000a360 6c 65 20 74 6f 20 74 65 73 74 20 61 20 70 61 74 |le to test a pat| 0000a370 65 6e 74 65 64 20 6d 65 74 68 6f 64 20 69 6e 20 |ented method in | 0000a380 74 68 65 20 63 6f 6e 74 65 78 74 20 6f 66 20 73 |the context of s| 0000a390 63 69 65 6e 74 69 66 69 63 0a 72 65 73 65 61 72 |cientific.resear| 0000a3a0 63 68 2c 20 62 75 74 20 61 6e 79 20 63 6f 6d 6d |ch, but any comm| 0000a3b0 65 72 63 69 61 6c 20 6f 72 20 72 6f 75 74 69 6e |ercial or routin| 0000a3c0 65 20 70 65 72 73 6f 6e 61 6c 20 75 73 65 20 69 |e personal use i| 0000a3d0 73 20 69 6e 66 72 69 6e 67 65 6d 65 6e 74 2e 29 |s infringement.)| 0000a3e0 0a 0a 49 20 72 65 63 6f 6d 6d 65 6e 64 20 74 68 |..I recommend th| 0000a3f0 61 74 20 70 65 6f 70 6c 65 20 6e 6f 74 20 75 73 |at people not us| 0000a400 65 20 4a 50 45 47 20 61 72 69 74 68 6d 65 74 69 |e JPEG arithmeti| 0000a410 63 20 63 6f 64 69 6e 67 3b 20 74 68 65 20 73 70 |c coding; the sp| 0000a420 61 63 65 20 73 61 76 69 6e 67 73 0a 69 73 6e 27 |ace savings.isn'| 0000a430 74 20 67 72 65 61 74 20 65 6e 6f 75 67 68 20 74 |t great enough t| 0000a440 6f 20 6a 75 73 74 69 66 79 20 74 68 65 20 70 6f |o justify the po| 0000a450 74 65 6e 74 69 61 6c 20 6c 65 67 61 6c 20 68 61 |tential legal ha| 0000a460 73 73 6c 65 73 2e 20 20 49 6e 20 70 61 72 74 69 |ssles. In parti| 0000a470 63 75 6c 61 72 2c 0a 61 72 69 74 68 6d 65 74 69 |cular,.arithmeti| 0000a480 63 20 63 6f 64 69 6e 67 20 2a 73 68 6f 75 6c 64 |c coding *should| 0000a490 20 6e 6f 74 2a 20 62 65 20 75 73 65 64 20 66 6f | not* be used fo| 0000a4a0 72 20 61 6e 79 20 69 6d 61 67 65 73 20 74 6f 20 |r any images to | 0000a4b0 62 65 20 65 78 63 68 61 6e 67 65 64 20 6f 6e 0a |be exchanged on.| 0000a4c0 55 73 65 6e 65 74 2e 20 20 45 76 65 6e 20 69 66 |Usenet. Even if| 0000a4d0 20 79 6f 75 20 64 6f 6e 27 74 20 63 61 72 65 20 | you don't care | 0000a4e0 61 62 6f 75 74 20 55 53 20 70 61 74 65 6e 74 20 |about US patent | 0000a4f0 6c 61 77 2c 20 6f 74 68 65 72 20 66 6f 6c 6b 73 |law, other folks| 0000a500 20 64 6f 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | do...----------| 0000a510 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 0000a520 2d 2d 2d 2d 0a 0a 53 75 62 6a 65 63 74 3a 20 5b |----..Subject: [| 0000a530 31 37 5d 20 43 6f 75 6c 64 20 61 6e 20 46 50 55 |17] Could an FPU| 0000a540 20 73 70 65 65 64 20 75 70 20 4a 50 45 47 3f 20 | speed up JPEG? | 0000a550 20 48 6f 77 20 61 62 6f 75 74 20 61 20 44 53 50 | How about a DSP| 0000a560 20 63 68 69 70 3f 0a 0a 53 69 6e 63 65 20 4a 50 | chip?..Since JP| 0000a570 45 47 20 69 73 20 73 6f 20 63 6f 6d 70 75 74 65 |EG is so compute| 0000a580 2d 69 6e 74 65 6e 73 69 76 65 2c 20 6d 61 6e 79 |-intensive, many| 0000a590 20 70 65 6f 70 6c 65 20 73 75 67 67 65 73 74 20 | people suggest | 0000a5a0 74 68 61 74 20 75 73 69 6e 67 20 61 6e 0a 46 50 |that using an.FP| 0000a5b0 55 20 63 68 69 70 20 28 61 20 6d 61 74 68 20 63 |U chip (a math c| 0000a5c0 6f 70 72 6f 63 65 73 73 6f 72 29 20 73 68 6f 75 |oprocessor) shou| 0000a5d0 6c 64 20 73 70 65 65 64 20 69 74 20 75 70 2e 20 |ld speed it up. | 0000a5e0 20 54 68 69 73 20 69 73 20 6e 6f 74 20 73 6f 2e | This is not so.| 0000a5f0 0a 4d 6f 73 74 20 70 72 6f 64 75 63 74 69 6f 6e |.Most production| 0000a600 2d 71 75 61 6c 69 74 79 20 4a 50 45 47 20 70 72 |-quality JPEG pr| 0000a610 6f 67 72 61 6d 73 20 75 73 65 20 6f 6e 6c 79 20 |ograms use only | 0000a620 69 6e 74 65 67 65 72 20 61 72 69 74 68 6d 65 74 |integer arithmet| 0000a630 69 63 20 61 6e 64 20 73 6f 0a 74 68 65 79 20 61 |ic and so.they a| 0000a640 72 65 20 75 6e 61 66 66 65 63 74 65 64 20 62 79 |re unaffected by| 0000a650 20 74 68 65 20 70 72 65 73 65 6e 63 65 20 6f 72 | the presence or| 0000a660 20 61 62 73 65 6e 63 65 20 6f 66 20 66 6c 6f 61 | absence of floa| 0000a670 74 69 6e 67 2d 70 6f 69 6e 74 20 68 61 72 64 77 |ting-point hardw| 0000a680 61 72 65 2e 0a 0a 49 74 20 69 73 20 70 6f 73 73 |are...It is poss| 0000a690 69 62 6c 65 20 74 6f 20 73 61 76 65 20 61 20 66 |ible to save a f| 0000a6a0 65 77 20 6f 70 65 72 61 74 69 6f 6e 73 20 62 79 |ew operations by| 0000a6b0 20 64 6f 69 6e 67 20 74 68 65 20 44 43 54 20 73 | doing the DCT s| 0000a6c0 74 65 70 20 69 6e 20 66 6c 6f 61 74 69 6e 67 0a |tep in floating.| 0000a6d0 70 6f 69 6e 74 2e 20 20 4f 6e 20 6d 6f 73 74 20 |point. On most | 0000a6e0 50 43 2d 63 6c 61 73 73 20 6d 61 63 68 69 6e 65 |PC-class machine| 0000a6f0 73 2c 20 46 50 20 6d 61 74 68 20 69 73 20 65 6e |s, FP math is en| 0000a700 6f 75 67 68 20 73 6c 6f 77 65 72 20 74 68 61 6e |ough slower than| 0000a710 20 69 6e 74 65 67 65 72 0a 6d 61 74 68 20 74 68 | integer.math th| 0000a720 61 74 20 74 68 65 20 6f 76 65 72 61 6c 6c 20 73 |at the overall s| 0000a730 70 65 65 64 20 69 73 20 73 74 69 6c 6c 20 6d 75 |peed is still mu| 0000a740 63 68 20 77 6f 72 73 65 20 77 69 74 68 20 46 50 |ch worse with FP| 0000a750 2e 20 20 53 6f 6d 65 20 68 69 67 68 2d 70 72 69 |. Some high-pri| 0000a760 63 65 64 0a 77 6f 72 6b 73 74 61 74 69 6f 6e 73 |ced.workstations| 0000a770 20 61 6e 64 20 73 75 70 65 72 63 6f 6d 70 75 74 | and supercomput| 0000a780 65 72 73 20 68 61 76 65 20 66 61 73 74 20 65 6e |ers have fast en| 0000a790 6f 75 67 68 20 46 50 20 68 61 72 64 77 61 72 65 |ough FP hardware| 0000a7a0 20 74 6f 20 6d 61 6b 65 20 61 6e 20 46 50 0a 44 | to make an FP.D| 0000a7b0 43 54 20 6d 65 74 68 6f 64 20 62 65 20 61 20 77 |CT method be a w| 0000a7c0 69 6e 2e 0a 0a 44 53 50 20 28 64 69 67 69 74 61 |in...DSP (digita| 0000a7d0 6c 20 73 69 67 6e 61 6c 20 70 72 6f 63 65 73 73 |l signal process| 0000a7e0 69 6e 67 29 20 63 68 69 70 73 20 61 72 65 20 69 |ing) chips are i| 0000a7f0 64 65 61 6c 6c 79 20 73 75 69 74 65 64 20 66 6f |deally suited fo| 0000a800 72 20 66 61 73 74 20 72 65 70 65 74 69 74 69 76 |r fast repetitiv| 0000a810 65 0a 69 6e 74 65 67 65 72 20 61 72 69 74 68 6d |e.integer arithm| 0000a820 65 74 69 63 2c 20 73 6f 20 70 72 6f 67 72 61 6d |etic, so program| 0000a830 6d 69 6e 67 20 61 20 44 53 50 20 74 6f 20 64 6f |ming a DSP to do| 0000a840 20 4a 50 45 47 20 63 61 6e 20 79 69 65 6c 64 20 | JPEG can yield | 0000a850 73 69 67 6e 69 66 69 63 61 6e 74 0a 73 70 65 65 |significant.spee| 0000a860 64 75 70 73 2e 20 20 44 53 50 73 20 61 72 65 20 |dups. DSPs are | 0000a870 73 74 61 72 74 69 6e 67 20 74 6f 20 62 65 20 66 |starting to be f| 0000a880 6f 75 6e 64 20 61 73 20 61 64 64 2d 6f 6e 73 20 |ound as add-ons | 0000a890 66 6f 72 20 50 43 73 20 61 6e 64 20 73 6d 61 6c |for PCs and smal| 0000a8a0 6c 0a 77 6f 72 6b 73 74 61 74 69 6f 6e 73 2c 20 |l.workstations, | 0000a8b0 73 6f 20 79 6f 75 20 63 61 6e 20 65 78 70 65 63 |so you can expec| 0000a8c0 74 20 74 6f 20 73 65 65 20 44 53 50 2d 62 61 73 |t to see DSP-bas| 0000a8d0 65 64 20 4a 50 45 47 20 70 72 6f 67 72 61 6d 73 |ed JPEG programs| 0000a8e0 20 70 6f 70 70 69 6e 67 20 75 70 2e 0a 0a 2d 2d | popping up...--| 0000a8f0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 0000a900 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 53 75 |------------..Su| 0000a910 62 6a 65 63 74 3a 20 5b 31 38 5d 20 49 73 6e 27 |bject: [18] Isn'| 0000a920 74 20 74 68 65 72 65 20 61 6e 20 4d 2d 4a 50 45 |t there an M-JPE| 0000a930 47 20 73 74 61 6e 64 61 72 64 20 66 6f 72 20 6d |G standard for m| 0000a940 6f 74 69 6f 6e 20 70 69 63 74 75 72 65 73 3f 0a |otion pictures?.| 0000a950 0a 41 73 20 77 61 73 20 73 74 61 74 65 64 20 69 |.As was stated i| 0000a960 6e 20 73 65 63 74 69 6f 6e 20 31 2c 20 4a 50 45 |n section 1, JPE| 0000a970 47 20 69 73 20 6f 6e 6c 79 20 66 6f 72 20 73 74 |G is only for st| 0000a980 69 6c 6c 20 69 6d 61 67 65 73 2e 20 20 4e 6f 6e |ill images. Non| 0000a990 65 74 68 65 6c 65 73 73 2c 0a 79 6f 75 20 77 69 |etheless,.you wi| 0000a9a0 6c 6c 20 66 72 65 71 75 65 6e 74 6c 79 20 73 65 |ll frequently se| 0000a9b0 65 20 72 65 66 65 72 65 6e 63 65 73 20 74 6f 20 |e references to | 0000a9c0 22 6d 6f 74 69 6f 6e 20 4a 50 45 47 22 20 6f 72 |"motion JPEG" or| 0000a9d0 20 22 4d 2d 4a 50 45 47 22 20 66 6f 72 20 76 69 | "M-JPEG" for vi| 0000a9e0 64 65 6f 2e 0a 2a 54 68 65 72 65 20 69 73 20 6e |deo..*There is n| 0000a9f0 6f 20 73 75 63 68 20 73 74 61 6e 64 61 72 64 2a |o such standard*| 0000aa00 2e 20 20 56 61 72 69 6f 75 73 20 76 65 6e 64 6f |. Various vendo| 0000aa10 72 73 20 68 61 76 65 20 61 70 70 6c 69 65 64 20 |rs have applied | 0000aa20 4a 50 45 47 20 74 6f 0a 69 6e 64 69 76 69 64 75 |JPEG to.individu| 0000aa30 61 6c 20 66 72 61 6d 65 73 20 6f 66 20 61 20 76 |al frames of a v| 0000aa40 69 64 65 6f 20 73 65 71 75 65 6e 63 65 2c 20 61 |ideo sequence, a| 0000aa50 6e 64 20 68 61 76 65 20 63 61 6c 6c 65 64 20 74 |nd have called t| 0000aa60 68 65 20 72 65 73 75 6c 74 20 22 4d 2d 4a 50 45 |he result "M-JPE| 0000aa70 47 22 2e 0a 55 6e 66 6f 72 74 75 6e 61 74 65 6c |G"..Unfortunatel| 0000aa80 79 2c 20 69 6e 20 74 68 65 20 61 62 73 65 6e 63 |y, in the absenc| 0000aa90 65 20 6f 66 20 61 6e 79 20 72 65 63 6f 67 6e 69 |e of any recogni| 0000aaa0 7a 65 64 20 73 74 61 6e 64 61 72 64 2c 20 74 68 |zed standard, th| 0000aab0 65 79 27 76 65 20 65 61 63 68 20 64 6f 6e 65 0a |ey've each done.| 0000aac0 69 74 20 64 69 66 66 65 72 65 6e 74 6c 79 2e 20 |it differently. | 0000aad0 20 54 68 65 20 72 65 73 75 6c 74 69 6e 67 20 66 | The resulting f| 0000aae0 69 6c 65 73 20 61 72 65 20 75 73 75 61 6c 6c 79 |iles are usually| 0000aaf0 20 6e 6f 74 20 63 6f 6d 70 61 74 69 62 6c 65 20 | not compatible | 0000ab00 61 63 72 6f 73 73 0a 64 69 66 66 65 72 65 6e 74 |across.different| 0000ab10 20 76 65 6e 64 6f 72 73 2e 0a 0a 4d 50 45 47 20 | vendors...MPEG | 0000ab20 69 73 20 74 68 65 20 72 65 63 6f 67 6e 69 7a 65 |is the recognize| 0000ab30 64 20 73 74 61 6e 64 61 72 64 20 66 6f 72 20 6d |d standard for m| 0000ab40 6f 74 69 6f 6e 20 70 69 63 74 75 72 65 20 63 6f |otion picture co| 0000ab50 6d 70 72 65 73 73 69 6f 6e 2e 20 20 49 74 20 75 |mpression. It u| 0000ab60 73 65 73 0a 6d 61 6e 79 20 6f 66 20 74 68 65 20 |ses.many of the | 0000ab70 73 61 6d 65 20 74 65 63 68 6e 69 71 75 65 73 20 |same techniques | 0000ab80 61 73 20 4a 50 45 47 2c 20 62 75 74 20 61 64 64 |as JPEG, but add| 0000ab90 73 20 69 6e 74 65 72 2d 66 72 61 6d 65 20 63 6f |s inter-frame co| 0000aba0 6d 70 72 65 73 73 69 6f 6e 20 74 6f 0a 65 78 70 |mpression to.exp| 0000abb0 6c 6f 69 74 20 74 68 65 20 73 69 6d 69 6c 61 72 |loit the similar| 0000abc0 69 74 69 65 73 20 74 68 61 74 20 75 73 75 61 6c |ities that usual| 0000abd0 6c 79 20 65 78 69 73 74 20 62 65 74 77 65 65 6e |ly exist between| 0000abe0 20 73 75 63 63 65 73 73 69 76 65 20 66 72 61 6d | successive fram| 0000abf0 65 73 2e 0a 42 65 63 61 75 73 65 20 6f 66 20 74 |es..Because of t| 0000ac00 68 69 73 2c 20 4d 50 45 47 20 74 79 70 69 63 61 |his, MPEG typica| 0000ac10 6c 6c 79 20 63 6f 6d 70 72 65 73 73 65 73 20 61 |lly compresses a| 0000ac20 20 76 69 64 65 6f 20 73 65 71 75 65 6e 63 65 20 | video sequence | 0000ac30 62 79 20 61 62 6f 75 74 20 61 0a 66 61 63 74 6f |by about a.facto| 0000ac40 72 20 6f 66 20 74 68 72 65 65 20 6d 6f 72 65 20 |r of three more | 0000ac50 74 68 61 6e 20 22 4d 2d 4a 50 45 47 22 20 6d 65 |than "M-JPEG" me| 0000ac60 74 68 6f 64 73 20 63 61 6e 2e 20 20 54 68 65 20 |thods can. The | 0000ac70 64 69 73 61 64 76 61 6e 74 61 67 65 73 20 6f 66 |disadvantages of| 0000ac80 20 4d 50 45 47 0a 61 72 65 20 28 31 29 20 69 74 | MPEG.are (1) it| 0000ac90 20 72 65 71 75 69 72 65 73 20 6d 75 63 68 20 6d | requires much m| 0000aca0 6f 72 65 20 63 6f 6d 70 75 74 61 74 69 6f 6e 20 |ore computation | 0000acb0 74 6f 20 67 65 6e 65 72 61 74 65 20 74 68 65 20 |to generate the | 0000acc0 63 6f 6d 70 72 65 73 73 65 64 0a 73 65 71 75 65 |compressed.seque| 0000acd0 6e 63 65 20 28 73 69 6e 63 65 20 64 65 74 65 63 |nce (since detec| 0000ace0 74 69 6e 67 20 76 69 73 75 61 6c 20 73 69 6d 69 |ting visual simi| 0000acf0 6c 61 72 69 74 69 65 73 20 69 73 20 68 61 72 64 |larities is hard| 0000ad00 20 66 6f 72 20 61 20 63 6f 6d 70 75 74 65 72 29 | for a computer)| 0000ad10 2c 20 61 6e 64 0a 28 32 29 20 69 74 27 73 20 64 |, and.(2) it's d| 0000ad20 69 66 66 69 63 75 6c 74 20 74 6f 20 65 64 69 74 |ifficult to edit| 0000ad30 20 61 6e 20 4d 50 45 47 20 73 65 71 75 65 6e 63 | an MPEG sequenc| 0000ad40 65 20 6f 6e 20 61 20 66 72 61 6d 65 2d 62 79 2d |e on a frame-by-| 0000ad50 66 72 61 6d 65 20 62 61 73 69 73 0a 28 73 69 6e |frame basis.(sin| 0000ad60 63 65 20 65 61 63 68 20 66 72 61 6d 65 20 69 73 |ce each frame is| 0000ad70 20 69 6e 74 69 6d 61 74 65 6c 79 20 74 69 65 64 | intimately tied| 0000ad80 20 74 6f 20 74 68 65 20 6f 6e 65 73 20 61 72 6f | to the ones aro| 0000ad90 75 6e 64 20 69 74 29 2e 20 20 54 68 69 73 20 6c |und it). This l| 0000ada0 61 74 74 65 72 0a 70 72 6f 62 6c 65 6d 20 68 61 |atter.problem ha| 0000adb0 73 20 6d 61 64 65 20 22 4d 2d 4a 50 45 47 22 20 |s made "M-JPEG" | 0000adc0 6d 65 74 68 6f 64 73 20 72 61 74 68 65 72 20 70 |methods rather p| 0000add0 6f 70 75 6c 61 72 20 66 6f 72 20 76 69 64 65 6f |opular for video| 0000ade0 20 65 64 69 74 69 6e 67 20 70 72 6f 64 75 63 74 | editing product| 0000adf0 73 2e 0a 0a 49 74 27 73 20 61 20 73 68 61 6d 65 |s...It's a shame| 0000ae00 20 74 68 61 74 20 74 68 65 72 65 20 69 73 6e 27 | that there isn'| 0000ae10 74 20 61 20 72 65 63 6f 67 6e 69 7a 65 64 20 4d |t a recognized M| 0000ae20 2d 4a 50 45 47 20 73 74 61 6e 64 61 72 64 2e 20 |-JPEG standard. | 0000ae30 20 42 75 74 20 74 68 65 72 65 0a 69 73 6e 27 74 | But there.isn't| 0000ae40 2c 20 73 6f 20 69 66 20 79 6f 75 20 62 75 79 20 |, so if you buy | 0000ae50 61 20 70 72 6f 64 75 63 74 20 69 64 65 6e 74 69 |a product identi| 0000ae60 66 69 65 64 20 61 73 20 22 4d 2d 4a 50 45 47 22 |fied as "M-JPEG"| 0000ae70 2c 20 62 65 20 61 77 61 72 65 20 74 68 61 74 20 |, be aware that | 0000ae80 79 6f 75 0a 61 72 65 20 70 72 6f 62 61 62 6c 79 |you.are probably| 0000ae90 20 6c 6f 63 6b 69 6e 67 20 79 6f 75 72 73 65 6c | locking yoursel| 0000aea0 66 20 69 6e 74 6f 20 74 68 61 74 20 6f 6e 65 20 |f into that one | 0000aeb0 76 65 6e 64 6f 72 2e 0a 0a 53 65 65 20 74 68 65 |vendor...See the| 0000aec0 20 4d 50 45 47 20 46 41 51 20 66 6f 72 20 6d 6f | MPEG FAQ for mo| 0000aed0 72 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 |re information a| 0000aee0 62 6f 75 74 20 4d 50 45 47 2e 0a 0a 2d 2d 2d 2d |bout MPEG...----| 0000aef0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 0000af00 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 53 75 62 6a |----------..Subj| 0000af10 65 63 74 3a 20 5b 31 39 5d 20 57 68 61 74 20 69 |ect: [19] What i| 0000af20 66 20 49 20 6e 65 65 64 20 6d 6f 72 65 20 74 68 |f I need more th| 0000af30 61 6e 20 38 2d 62 69 74 20 70 72 65 63 69 73 69 |an 8-bit precisi| 0000af40 6f 6e 3f 0a 0a 42 61 73 65 6c 69 6e 65 20 4a 50 |on?..Baseline JP| 0000af50 45 47 20 73 74 6f 72 65 73 20 69 6d 61 67 65 73 |EG stores images| 0000af60 20 77 69 74 68 20 38 20 62 69 74 73 20 70 65 72 | with 8 bits per| 0000af70 20 63 6f 6c 6f 72 20 73 61 6d 70 6c 65 2c 20 69 | color sample, i| 0000af80 6e 20 6f 74 68 65 72 20 77 6f 72 64 73 0a 32 34 |n other words.24| 0000af90 20 62 69 74 73 20 70 65 72 20 70 69 78 65 6c 20 | bits per pixel | 0000afa0 66 6f 72 20 52 47 42 20 69 6d 61 67 65 73 2c 20 |for RGB images, | 0000afb0 38 20 62 69 74 73 2f 70 69 78 65 6c 20 66 6f 72 |8 bits/pixel for| 0000afc0 20 67 72 61 79 73 63 61 6c 65 2c 20 33 32 20 62 | grayscale, 32 b| 0000afd0 69 74 73 2f 70 69 78 65 6c 0a 66 6f 72 20 43 4d |its/pixel.for CM| 0000afe0 59 4b 2c 20 65 74 63 2e 20 20 54 68 65 72 65 20 |YK, etc. There | 0000aff0 69 73 20 61 6e 20 65 78 74 65 6e 73 69 6f 6e 20 |is an extension | 0000b000 74 68 61 74 20 73 74 6f 72 65 73 20 31 32 20 62 |that stores 12 b| 0000b010 69 74 73 2f 73 61 6d 70 6c 65 20 66 6f 72 0a 61 |its/sample for.a| 0000b020 70 70 6c 69 63 61 74 69 6f 6e 73 20 74 68 61 74 |pplications that| 0000b030 20 6e 65 65 64 20 68 69 67 68 65 72 20 61 63 63 | need higher acc| 0000b040 75 72 61 63 79 2e 20 20 4d 65 64 69 63 61 6c 20 |uracy. Medical | 0000b050 69 6d 61 67 65 73 2c 20 66 6f 72 20 65 78 61 6d |images, for exam| 0000b060 70 6c 65 2c 20 61 72 65 0a 6f 66 74 65 6e 20 31 |ple, are.often 1| 0000b070 32 2d 62 69 74 20 67 72 61 79 73 63 61 6c 65 2e |2-bit grayscale.| 0000b080 20 20 54 68 65 20 31 32 2d 62 69 74 20 65 78 74 | The 12-bit ext| 0000b090 65 6e 73 69 6f 6e 20 69 73 20 6e 6f 74 20 76 65 |ension is not ve| 0000b0a0 72 79 20 77 69 64 65 6c 79 20 73 75 70 70 6f 72 |ry widely suppor| 0000b0b0 74 65 64 2c 0a 68 6f 77 65 76 65 72 2e 20 20 4f |ted,.however. O| 0000b0c0 6e 65 20 70 61 63 6b 61 67 65 20 74 68 61 74 20 |ne package that | 0000b0d0 64 6f 65 73 20 73 75 70 70 6f 72 74 20 69 74 20 |does support it | 0000b0e0 69 73 20 74 68 65 20 66 72 65 65 20 49 4a 47 20 |is the free IJG | 0000b0f0 73 6f 75 72 63 65 20 63 6f 64 65 20 28 73 65 65 |source code (see| 0000b100 0a 70 61 72 74 20 32 20 6f 66 20 74 68 69 73 20 |.part 2 of this | 0000b110 46 41 51 29 2e 0a 0a 46 6f 72 20 6c 6f 73 73 6c |FAQ)...For lossl| 0000b120 65 73 73 20 4a 50 45 47 2c 20 74 68 65 20 73 74 |ess JPEG, the st| 0000b130 61 6e 64 61 72 64 20 70 65 72 6d 69 74 73 20 61 |andard permits a| 0000b140 6e 79 20 64 61 74 61 20 70 72 65 63 69 73 69 6f |ny data precisio| 0000b150 6e 20 62 65 74 77 65 65 6e 20 32 20 61 6e 64 20 |n between 2 and | 0000b160 31 36 0a 62 69 74 73 20 70 65 72 20 73 61 6d 70 |16.bits per samp| 0000b170 6c 65 2c 20 62 75 74 20 68 69 67 68 2d 70 72 65 |le, but high-pre| 0000b180 63 69 73 69 6f 6e 20 6c 6f 73 73 6c 65 73 73 20 |cision lossless | 0000b190 4a 50 45 47 20 69 73 20 65 76 65 6e 20 6c 65 73 |JPEG is even les| 0000b1a0 73 20 77 69 64 65 6c 79 0a 73 75 70 70 6f 72 74 |s widely.support| 0000b1b0 65 64 20 74 68 61 6e 20 68 69 67 68 2d 70 72 65 |ed than high-pre| 0000b1c0 63 69 73 69 6f 6e 20 6c 6f 73 73 79 20 4a 50 45 |cision lossy JPE| 0000b1d0 47 2e 20 20 49 20 64 6f 6e 27 74 20 6b 6e 6f 77 |G. I don't know| 0000b1e0 20 6f 66 20 61 6e 79 20 77 6f 72 6b 69 6e 67 0a | of any working.| 0000b1f0 6e 6f 6e 63 6f 6d 6d 65 72 63 69 61 6c 20 69 6d |noncommercial im| 0000b200 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 2e 20 20 |plementations. | 0000b210 28 54 68 65 20 43 6f 72 6e 65 6c 6c 20 6c 6f 73 |(The Cornell los| 0000b220 73 6c 65 73 73 20 4a 50 45 47 20 63 6f 64 65 72 |sless JPEG coder| 0000b230 20 74 72 69 65 73 20 74 6f 0a 73 75 70 70 6f 72 | tries to.suppor| 0000b240 74 20 69 74 2c 20 62 75 74 20 72 65 70 6f 72 74 |t it, but report| 0000b250 65 64 6c 79 20 68 61 73 20 62 75 67 73 20 77 69 |edly has bugs wi| 0000b260 74 68 20 64 61 74 61 20 6f 66 20 6d 6f 72 65 20 |th data of more | 0000b270 74 68 61 6e 20 38 20 62 69 74 73 2e 29 0a 0a 2d |than 8 bits.)..-| 0000b280 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 0000b290 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 53 |-------------..S| 0000b2a0 75 62 6a 65 63 74 3a 20 5b 32 30 5d 20 57 68 65 |ubject: [20] Whe| 0000b2b0 72 65 20 61 72 65 20 46 41 51 20 6c 69 73 74 73 |re are FAQ lists| 0000b2c0 20 61 72 63 68 69 76 65 64 3f 0a 0a 4d 61 6e 79 | archived?..Many| 0000b2d0 20 46 41 51 73 20 61 72 65 20 63 72 6f 73 73 70 | FAQs are crossp| 0000b2e0 6f 73 74 65 64 20 74 6f 20 6e 65 77 73 2e 61 6e |osted to news.an| 0000b2f0 73 77 65 72 73 2e 20 20 57 65 6c 6c 2d 72 75 6e |swers. Well-run| 0000b300 20 6e 65 74 6e 65 77 73 20 73 69 74 65 73 20 77 | netnews sites w| 0000b310 69 6c 6c 20 68 61 76 65 0a 74 68 65 20 6c 61 74 |ill have.the lat| 0000b320 65 73 74 20 76 65 72 73 69 6f 6e 73 20 61 76 61 |est versions ava| 0000b330 69 6c 61 62 6c 65 20 69 6e 20 74 68 61 74 20 6e |ilable in that n| 0000b340 65 77 73 67 72 6f 75 70 2e 20 20 48 6f 77 65 76 |ewsgroup. Howev| 0000b350 65 72 2c 20 74 68 65 72 65 20 61 72 65 20 61 20 |er, there are a | 0000b360 2a 6c 6f 74 2a 0a 6f 66 20 70 6f 73 74 69 6e 67 |*lot*.of posting| 0000b370 73 20 69 6e 20 6e 65 77 73 2e 61 6e 73 77 65 72 |s in news.answer| 0000b380 73 2c 20 61 6e 64 20 74 68 65 79 20 63 61 6e 20 |s, and they can | 0000b390 62 65 20 68 61 72 64 20 74 6f 20 73 6f 72 74 20 |be hard to sort | 0000b3a0 74 68 72 6f 75 67 68 2e 0a 0a 54 68 65 20 6c 61 |through...The la| 0000b3b0 74 65 73 74 20 76 65 72 73 69 6f 6e 73 20 6f 66 |test versions of| 0000b3c0 20 6e 65 77 73 2e 61 6e 73 77 65 72 73 20 70 6f | news.answers po| 0000b3d0 73 74 69 6e 67 73 20 61 72 65 20 61 72 63 68 69 |stings are archi| 0000b3e0 76 65 64 20 61 74 20 72 74 66 6d 2e 6d 69 74 2e |ved at rtfm.mit.| 0000b3f0 65 64 75 2e 0a 59 6f 75 20 63 61 6e 20 72 65 74 |edu..You can ret| 0000b400 72 69 65 76 65 20 74 68 69 73 20 46 41 51 20 62 |rieve this FAQ b| 0000b410 79 20 46 54 50 20 61 73 20 2f 70 75 62 2f 75 73 |y FTP as /pub/us| 0000b420 65 6e 65 74 2f 6e 65 77 73 2e 61 6e 73 77 65 72 |enet/news.answer| 0000b430 73 2f 6a 70 65 67 2d 66 61 71 2f 70 61 72 74 31 |s/jpeg-faq/part1| 0000b440 0a 61 6e 64 20 2f 70 75 62 2f 75 73 65 6e 65 74 |.and /pub/usenet| 0000b450 2f 6e 65 77 73 2e 61 6e 73 77 65 72 73 2f 6a 70 |/news.answers/jp| 0000b460 65 67 2d 66 61 71 2f 70 61 72 74 32 2e 20 20 49 |eg-faq/part2. I| 0000b470 66 20 79 6f 75 20 68 61 76 65 20 6e 6f 20 46 54 |f you have no FT| 0000b480 50 20 61 63 63 65 73 73 2c 0a 73 65 6e 64 20 65 |P access,.send e| 0000b490 2d 6d 61 69 6c 20 74 6f 20 6d 61 69 6c 2d 73 65 |-mail to mail-se| 0000b4a0 72 76 65 72 40 72 74 66 6d 2e 6d 69 74 2e 65 64 |rver@rtfm.mit.ed| 0000b4b0 75 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 |u containing the| 0000b4c0 20 6c 69 6e 65 73 0a 09 73 65 6e 64 20 75 73 65 | lines..send use| 0000b4d0 6e 65 74 2f 6e 65 77 73 2e 61 6e 73 77 65 72 73 |net/news.answers| 0000b4e0 2f 6a 70 65 67 2d 66 61 71 2f 70 61 72 74 31 0a |/jpeg-faq/part1.| 0000b4f0 09 73 65 6e 64 20 75 73 65 6e 65 74 2f 6e 65 77 |.send usenet/new| 0000b500 73 2e 61 6e 73 77 65 72 73 2f 6a 70 65 67 2d 66 |s.answers/jpeg-f| 0000b510 61 71 2f 70 61 72 74 32 0a 28 49 66 20 79 6f 75 |aq/part2.(If you| 0000b520 20 64 6f 6e 27 74 20 67 65 74 20 61 20 72 65 70 | don't get a rep| 0000b530 6c 79 2c 20 74 68 65 20 73 65 72 76 65 72 20 6d |ly, the server m| 0000b540 61 79 20 62 65 20 6d 69 73 72 65 61 64 69 6e 67 |ay be misreading| 0000b550 20 79 6f 75 72 20 72 65 74 75 72 6e 20 61 64 64 | your return add| 0000b560 72 65 73 73 3b 0a 61 64 64 20 61 20 6c 69 6e 65 |ress;.add a line| 0000b570 20 73 75 63 68 20 61 73 20 22 70 61 74 68 20 6d | such as "path m| 0000b580 79 6e 61 6d 65 40 6d 79 73 69 74 65 22 20 74 6f |yname@mysite" to| 0000b590 20 73 70 65 63 69 66 79 20 79 6f 75 72 20 63 6f | specify your co| 0000b5a0 72 72 65 63 74 20 65 2d 6d 61 69 6c 0a 61 64 64 |rrect e-mail.add| 0000b5b0 72 65 73 73 20 74 6f 20 72 65 70 6c 79 20 74 6f |ress to reply to| 0000b5c0 2e 29 20 20 46 6f 72 20 6d 6f 72 65 20 69 6e 66 |.) For more inf| 0000b5d0 6f 20 61 62 6f 75 74 20 74 68 65 20 46 41 51 20 |o about the FAQ | 0000b5e0 61 72 63 68 69 76 65 2c 20 72 65 74 72 69 65 76 |archive, retriev| 0000b5f0 65 20 74 68 65 0a 66 69 6c 65 20 72 74 66 6d 2e |e the.file rtfm.| 0000b600 6d 69 74 2e 65 64 75 3a 2f 70 75 62 2f 75 73 65 |mit.edu:/pub/use| 0000b610 6e 65 74 2f 6e 65 77 73 2e 61 6e 73 77 65 72 73 |net/news.answers| 0000b620 2f 6e 65 77 73 2d 61 6e 73 77 65 72 73 2f 69 6e |/news-answers/in| 0000b630 74 72 6f 64 75 63 74 69 6f 6e 2e 0a 0a 54 68 65 |troduction...The| 0000b640 20 73 61 6d 65 20 46 41 51 73 20 61 72 65 20 61 | same FAQs are a| 0000b650 6c 73 6f 20 61 76 61 69 6c 61 62 6c 65 20 69 6e |lso available in| 0000b660 20 74 68 65 20 57 6f 72 6c 64 20 57 69 64 65 20 | the World Wide | 0000b670 57 65 62 3b 20 73 65 65 20 74 68 65 20 69 6e 64 |Web; see the ind| 0000b680 65 78 20 61 74 0a 68 74 74 70 3a 2f 2f 77 77 77 |ex at.http://www| 0000b690 2e 63 69 73 2e 6f 68 69 6f 2d 73 74 61 74 65 2e |.cis.ohio-state.| 0000b6a0 65 64 75 2f 68 79 70 65 72 74 65 78 74 2f 66 61 |edu/hypertext/fa| 0000b6b0 71 2f 75 73 65 6e 65 74 2f 46 41 51 2d 4c 69 73 |q/usenet/FAQ-Lis| 0000b6c0 74 2e 68 74 6d 6c 2e 20 20 54 68 69 73 20 46 41 |t.html. This FA| 0000b6d0 51 0a 69 73 20 68 74 74 70 3a 2f 2f 77 77 77 2e |Q.is http://www.| 0000b6e0 63 69 73 2e 6f 68 69 6f 2d 73 74 61 74 65 2e 65 |cis.ohio-state.e| 0000b6f0 64 75 2f 68 79 70 65 72 74 65 78 74 2f 66 61 71 |du/hypertext/faq| 0000b700 2f 75 73 65 6e 65 74 2f 6a 70 65 67 2d 66 61 71 |/usenet/jpeg-faq| 0000b710 2f 74 6f 70 2e 68 74 6d 6c 2e 0a 4f 74 68 65 72 |/top.html..Other| 0000b720 20 57 57 57 20 46 41 51 20 61 72 63 68 69 76 65 | WWW FAQ archive| 0000b730 73 20 69 6e 63 6c 75 64 65 20 68 74 74 70 3a 2f |s include http:/| 0000b740 2f 77 77 77 2e 63 73 2e 72 75 75 2e 6e 6c 2f 63 |/www.cs.ruu.nl/c| 0000b750 67 69 2d 62 69 6e 2f 66 61 71 77 61 69 73 20 61 |gi-bin/faqwais a| 0000b760 6e 64 0a 68 74 74 70 3a 2f 2f 77 77 77 2e 6c 69 |nd.http://www.li| 0000b770 62 2e 6f 78 2e 61 63 2e 75 6b 2f 69 6e 74 65 72 |b.ox.ac.uk/inter| 0000b780 6e 65 74 2f 6e 65 77 73 2f 2e 0a 0a 2d 2d 20 0a |net/news/...-- .| 0000b790 09 09 09 74 6f 6d 20 6c 61 6e 65 0a 09 09 09 6f |...tom lane....o| 0000b7a0 72 67 61 6e 69 7a 65 72 2c 20 49 6e 64 65 70 65 |rganizer, Indepe| 0000b7b0 6e 64 65 6e 74 20 4a 50 45 47 20 47 72 6f 75 70 |ndent JPEG Group| 0000b7c0 0a 09 09 09 74 67 6c 40 6e 65 74 63 6f 6d 2e 63 |....tgl@netcom.c| 0000b7d0 6f 6d 20 6f 72 20 74 67 6c 40 73 73 73 2e 70 67 |om or tgl@sss.pg| 0000b7e0 68 2e 70 61 2e 75 73 0a |h.pa.us.| 0000b7e8