.GIF vs .JPG vs .BMP vs .etc........why one over the other?

bigred

Penultimate Amazing
Joined
Jan 19, 2005
Messages
22,756
Location
USA
Pros/cons? Based on what little I know:

.GIFs: load faster.

.JPGs: much smaller.

.BMPs: ? maybe better res in some cases, esp. over .GIFs.

As for .PNGs, .TIFFs, etc I have no idea why they exist other than they are formats that just haven't gone away yet. I have heard that .PNGs are better for "truer" screen snapshots etc but haven't noticed much diff.
 
Gif: Color reduction, internet format. The picture can becone grainy and if you cut the colors down too much, well let's just say don't. Transparancy compatible and backward compatible with most browsers.
Jpg: Compression artifacts, which is why it should never be used for photoediting. Use PSD or other uncompressed format instead. Internet format.
BMP: Uncompressed, but f****** huge!. NOT INTERNET COMPATIBLE!
PNG: Alpha channel/ transparancy compatible but not that used. Developed as competition for GIF. Internet format. Have problem with transparancy in older browsers (read: pre-IE 5.5)
Tiff: If you are shooting photos with a digital cam, use this one. Uncompressed, huge, but ideal for further editing like removal of red eyes etc. Don't count it out just because it isn't used on the internet. This is my native format when I work with a camera which can handle it.
RAW: Photo format. Detailed RGB format only used by professional even if most digital cameras can do it. F****** huge and so far I've only encountered one program which can handle it and thats photoshop.
 
BMP: pointlessly large.
PNG: good for most things. Any browser should support them now.
TIFF: work of satan. Good for DTP types who don't know any better.
GIF: pointless except for web animation. Then just annoying.

Cheers,
Rat.
 
Jpg: Compression artifacts, which is why it should never be used for photoediting. Use PSD or other uncompressed format instead. Internet format.

This is a bit of an over generalization. Lossy compression (i.e. JPEG) is bad. Lossless compression (.zip, LZW, RLE) are perfectly acceptable for photoediting. In fact PSD uses RLE compression.

PNG's can do true 24-bit color with lossless compression and alpha channel transparancy. It was developed as an alternate to GIF. The reason GIF needed an alternate was a patent on the compression system in GIF files was being used to threaten web-site owners that used GIF file formats for fees. PNG's compression does not suffer from this.

Another file format: JPEG2000. This uses wavelet compression, different than the compression in standard JPEGs, to produce smaller files with fewer artifacts. Still lossy compression, don't use for repeat sessions through a photo editior. Not sure this has support in many browsers yet.
 
PNG's can do true 24-bit color with lossless compression and alpha channel transparancy. It was developed as an alternate to GIF. The reason GIF needed an alternate was a patent on the compression system in GIF files was being used to threaten web-site owners that used GIF file formats for fees. PNG's compression does not suffer from this.
While that may have been the inspiration for the creation of png, gif had long outlived its usefulness by that time anyway. 256 colours is just too small for many purposes.

kevin said:
Another file format: JPEG2000. This uses wavelet compression, different than the compression in standard JPEGs, to produce smaller files with fewer artifacts. Still lossy compression, don't use for repeat sessions through a photo editior. Not sure this has support in many browsers yet.
I'm not sure if I misunderstood this last time I looked into it, but if I read correctly, the patent restrictions on gif are as nothing to those on JPEG2000. I really see no advantage to it over png, except in absolute file size.

Cheers,
Rat.
 
When you're after the smallest size you'll generally use either GIF or JPG. GIF will give better results when there are only a few colors in the picture, like cartoons. JPG will be better with color photographs.
 
While that may have been the inspiration for the creation of png, gif had long outlived its usefulness by that time anyway. 256 colours is just too small for many purposes.

Mostly true. For small color things like logos or styled text it still produces smaller files than JPEG, and it's lossless compression so you can edit over and over without worries.

The concept of a limited color palette to reduce file size is still popular, which is why there is a PNG-8 format (8-bit color with a custom defined palette).

I'm not sure if I misunderstood this last time I looked into it, but if I read correctly, the patent restrictions on gif are as nothing to those on JPEG2000. I really see no advantage to it over png, except in absolute file size.

Eh, When JPEG2000 was developed it was supposed to be either patent free, or guaranteed royalty free with all applicable patents declared up front. Turns out one of the companies working on it was holding out and the patent issue is currently up in the air -- probably the reason it has not been widely adopted quite yet.

Pure file size is a huge issue in raster imagery and reason enough alone to adopt a standard. If you're running a porn, I mean satellite imagery site, the bandwidth savings are enormous. In our office we use a wavelet compression system from LizardTech on aerial photography. I've seen a 4GB LZW compressed TIFF imagery go to under 500MB. Very nice.
 
.GIFs=Ok if you want animation other than that don't waste your time

.JPG=:Ok for images if you don'y mind useing a losey compression format

.BMPs=ok on a computer if you want to be really sure of not loseing data. Other than that too big to be practical

.PNGs=What to use if you don't want a losey compression format. Supports tansprancy (although IE can have minor issues). May run into issues on very old browsers.

.SVG=Has its uses but not useful for anything you want to copyright.


Wikipedia covers these issues in a lot of detail
http://en.wikipedia.org/wiki/GIF
http://en.wikipedia.org/wiki/JPEG
http://en.wikipedia.org/wiki/Windows_bitmap
http://en.wikipedia.org/wiki/PNG
http://en.wikipedia.org/wiki/SVG

and more generaly:

http://en.wikipedia.org/wiki/Image_file_formats
 
why do say this? File format has nothing to do with copyright.

That infinet scalibility is something you really do not want. If you poduce a fairly low res JPEG or PNG image at least any likely copyvios will be limited to being online. If you use SVG that is not the case.
 
That infinet scalibility is something you really do not want. If you poduce a fairly low res JPEG or PNG image at least any likely copyvios will be limited to being online. If you use SVG that is not the case.

SVG has limited applicability (don't do photos with it) but that's one of the worst reasons I've heard for avoiding a file format. If someone is going to steal your works, resolution isn't going to stop them. Ask the purchasers of pirated DVD's consisting of copies made with home cameras in movie theatres if high quality is why they buy pirated materials.

I take you avoid adobe illustrator files too?
 
Eh, When JPEG2000 was developed it was supposed to be either patent free, or guaranteed royalty free with all applicable patents declared up front. Turns out one of the companies working on it was holding out and the patent issue is currently up in the air -- probably the reason it has not been widely adopted quite yet.
Which is why I said I may have misunderstood it. I just remember seeing that a new version of jpg was around that had much better compression, with rumoured losslessness as an option. When I tried at the time to find an app that would save to this format, I found nothing. Even the great Irfanview still only lets you save up to 640x480 with an unregistered plug-in.

Cheers,
Rat.
 
Do any other web-friendly graphic formats support transparency?
You mean other than the aforementioned pngs? People tell me that they're not well supported, but I've had no trouble with them for years. They support transparency at any bit-depth, although IE may still have trouble (I'm told, I haven't tested recently) with any greater than 8-bit. Still better than gif.

Cheers,
Rat.
 
Which is why I said I may have misunderstood it. I just remember seeing that a new version of jpg was around that had much better compression, with rumoured losslessness as an option. When I tried at the time to find an app that would save to this format, I found nothing. Even the great Irfanview still only lets you save up to 640x480 with an unregistered plug-in.

Cheers,
Rat.

Graphic Converter on the Mac supports Jpeg 2000 and does have a lossless mode. Photoshop CS and above support it out of the box, not sure what modes it has.

Of course since browsers don't support it, it isn't garnerning much attention.
 
SVG has limited applicability (don't do photos with it) but that's one of the worst reasons I've heard for avoiding a file format. If someone is going to steal your works, resolution isn't going to stop them. Ask the purchasers of pirated DVD's consisting of copies made with home cameras in movie theatres if high quality is why they buy pirated materials.

I take you avoid adobe illustrator files too?

Well since most of the photos I put on the internet are GFDL anyway I don't view it as a problem.


In the case of those pirated DVDs the issue is generaly that there is nothing else better availible. Once there is people tend to want a reasonable level of quality.

The issue kicks in as soon as you move away from on screen formats. What may have been acceptable resolution on screen tends not to be on paper or a shirt.
 
Pros/cons? Based on what little I know:

.GIFs: load faster.

.JPGs: much smaller.

.BMPs: ? maybe better res in some cases, esp. over .GIFs.

As for .PNGs, .TIFFs, etc I have no idea why they exist other than they are formats that just haven't gone away yet. I have heard that .PNGs are better for "truer" screen snapshots etc but haven't noticed much diff.

GIFs are better for synthetic images with sharp boundaries. Graphs, diagrams, and the like.

JPEGs get better compression out of natural images, like photographs. They use the discrete cosine transformation, which is essentially a Fourier transform and removing the higher frequencies.

BMPs are, basically, Microsoft saying "let's have a format, and make everything use it, and then we can pwn everyone," which is about what they always say.

TIFFs can get huge and express anything. They're modeled after the format that fax machines use, but they've grown a lot more hair.

PNG is a free public format released about the time that Compuserve was being really anal about GIF patents.
 
PNG is a free public format released about the time that Compuserve was being really anal about GIF patents.

The GIF patent was held by Unisys, it was never Compuserve that enforced the patent.

http://www.unisys.com/about__unisys/lzw

Also there is no difference between the edge qualities of PNG-8 vs. GIF. Since GIF uses a limited color palette it would produce effects that can seem to sharpen a line. PNG-8 has the similar limitation. Of course if you don't want an artificially sharpened line then PNG-24 is the way to go.
 

Back
Top Bottom