What is the difference? And I know one of them is better for electronic things like web pages and the other for printing; I need to remember which is which.
Sorry if this came up twice.
What is the difference? And I know one of them is better for electronic things like web pages and the other for printing; I need to remember which is which.
Sorry if this came up twice.
Use JPGs or GIFs for web pages, and TIFs for printing. JPGs should be used for photographs or graphics files with continuous gradations of tone, GIFs are best for line art or graphics with many sharp edges, TIFs are much bigger losslessly compressed files used for printing and the such.
TIF is a lossless format - the image you get out is exactly the same as you put in, even if compression is used (it uses the LZW algorithm). JPG is a lossy format; files are typically very compact, but at the expense of integrity; the image compression algorithm tries to make the file look the same, but the image you get out is not the same as you put in.
For things like web pages, jpegs are ideal, because they look OK and they are so compact that the page can load reasonably quickly, however, for important images (perhaps archive photos), TIF (or some other non-lossy format) is a better choice.
TIFs also scale better when enlarging, which is why it is good to keep original images as TIFs and make copies as JPGs.
Is there an advantage of TIF over BMP format? BMP is also lossless.
I believe that for most things, BMP would be even bigger than TIF - BMP is essentially uncompressed graphic information – taking each pixel in the image in a straightforward order and recording its full characteristics to whatever the appropriate color depth.
I believe that TIF uses some sort of lossless compression similar to what Zip archivers use… for instance if there’s a lot of the same shade of white in the image, the TIF encoder might come up with a shorthand for white and use that for each of those pixels… not sure of the exact details.
It’s my understanding that TIF is related to GIF, in that it will be most efficient for images which have large patches of uniform color. JPEG is most efficient and least lossy for images with smooth gradations: It’ll work well for photographs of real-world scenes, but unless you set the image quality very high (and therefore get almost no compression and huge files), JPEG format will mangle things like graphs with lines with sharp edges.
Fortunately, the set of images for which GIF is good and the set for which JPEG is good are largely complimentary, so any given image will do well as one or the other. This is why they’re the two standard formats for use with Web pages.
Tiff is an image file wrapper standard. I.e., you can use any old way to compress (or not) the image inside a Tiff file as long as the header is consistent. But then you have to provide the software to encode/decode such files.
I’ve seen Tiffs where the data is stored in a variety of formats from good old run length encoding to basically a Jpeg wrapped inside.
So chaos rules in the Tiff world. If you stick to a given software maker’s Tiff package, you should be okay. But if you are moving Tiffs around you can have problems. I.e., email a Tiff to someone, they might not be able to view/print it with their software.
The maker of your software should be able to tell you what sort of compression and lossy encoding its software uses (and you might be able to choose among several options).
You should definitely keep images as much as possible in a lossless format. E.g., scan into a lossless Tiff format, save that for archival purposes. Edit and save for web pages into a Jpeg format.
Note that the Jpeg specification also doesn’t specify a particular file format for storing a Jpeg. However, we got lucky in that the JFIF format was almost universally adopted early on, so incompatible Jpegs are rare. (And the main reason for this is because the free, open JFIF software was circulated almost immediately after the Jpeg standard was set.
Note that Gifs are also good for storing grey-scale images. (No one ever bothered to tweak the JFIF format for grey-scale images.)
Interesting – I was wondering if GIF and TIF were at all alike while composing my own post. I know that GIF works (generally) by listing all possible pixel colors in a pallette with a limit of 256 colors in the pallette, and then I believe it encodes the image as a modified bitmap – with each pixel being encoded with a color number from the pallette, or something like that. (I would assume that if you have only 16 colors in the pallette, you only need four bits per pixel - but what happens if you have 34 ??)
Is TIF similar with the ability to handle much bigger pallette sizes, so that you never have to use 'closest approximation? Or am I missing the boat on how the GIF format works??
Somebody will correct me it I’m wrong…
Bitmaps have the raw image data, and nothing else. Tiffs (Tagged Image File Format) include metadata. This can include resolutions, sizes, details of the original capturer, ownership, etc.
For my use TIFF is preferred only for editing. If you open, edit and repeatedly save a JPG file it gets recompressed every time and eventually there may be a loss of detail. this is not the case with formats that do not use lossy compression.
My digital cameras can actually produce TIFF files but this is usually the worst option as the extremely large file takes more time to process and store. The camera can also save in a proprietary raw format that consists of totally unprocessed data from the sensor plus meta data for all the camera settings (white balance, sharpening, color space) so they can be applied in post processing. This data is about 2/3 the size of a TIFF file but actually contains more image data. When I process I converted to TIFF for editing and I may need to switch to a new editor that can handle TIFF with 16 bit per plane color depth.
AFAIK GIF only has a 256 color palette.
Note my previous post. If a Tiff software developer decides to use 256 colors (or less) and LZW compression, then it’s a Gif-like Tiff. But they can choose any old method of encoding they want. They can choose a single bit (black and white) or 43 bits/color and 17 base colors if they want. They can choose to store the raw pixels or they can use a proprietary compression method no one else knows about. Etc.
Also, converting a “full color” image to a 256 color image can be done an infinite number of ways and has nothing to do with the Gif-format. To encode into a Gif, the image has to already be reduced to 256 colors or less. Some color reduction methods are very good (but slow), others are terrible (but maybe faster). Note that a lot of software to encode Gifs does both steps and doesn’t allow you to choose what color reduction to use.