Page 1 of 2 12 LastLast
Results 1 to 15 of 29

Thread: The Different Image File Types

  1. #1

    Default The Different Image File Types

    Does anyone know the major differences between the image file types like JPEG, TIFF, GIF, PNG, and Bitmap? I'm asking this so I can become a better sig/avatar maker.

    I barely know anything about them other than PNG is good for keeping pictures exactly the same even after saving them and JPEG is good for pictures you're not going to edit again in paint.

  2. #2
    i n v i s i b l e Tech Admin o_O's Avatar
    Join Date
    Jun 2001
    Location
    New Zealand
    Posts
    2,957
    Blog Entries
    1

    FFXIV Character

    Humphrey Squibbles (Sargatanas)

    Default

    Basically, if you start out with an uncompressed image, saving it as another format will perform a series of operations on the data to achieve maximum quality or compression.

    JPG/JPEG is a file format based on storing the averages of regions of the image. It divides the uncompressed image up into blocks and fills the pixels in each block with the average colour of the whole block. This makes it suitable for graphics that have a very large number of colours, like a photograph or screenshot of a 3D video game. It doesn't support transparency, which is the main reason I don't use it. Every time you open a JPEG file, it decompresses and recompresses when you close it. The silly thing about that is that it uses lossy encryption and therefore each time the image is accessed it contains different data. Open/close a JPEG enough times and you'll end up with a blank, one-colour image. You have to do it quite a few times though.

    GIF is palette-based. That means a portion of the file is dedicated to holding information about every colour that appears in the image. Not surprisingly, you don't really want to use GIF for anything that contains a lot of colours. If your uncompressed image has too many colours, depending on the quality of GIF it will lose quality in varying degrees: The editor will determine the most common colours in the picture and put them in the palette, then substitute all of the extra colours in the image with the closest match from the palette. GIF is only 8 bits per pixel (2 red, 2 green, 2 blue, 2 alpha) so it has a small file size making it good for use in the internets. It supports transparency and animation as well. GIF is suitable for web graphics and logos, etc. but it's not too bad if you don't need a high quality photo.

    PNG is like GIF, only 24 bits per pixel, allowing for three times better quality, but has a larger file size. GIF supports up to 256 colours, while PNG supports up to 281474976710656. PNG lacks support for animation, but MNG, which is an extension doesn't. PNG has a far higher information:byte ratio than JPG thanks to a better compression algorithm.

    TIFF is a flexible file format. You can pretty much do what you want with it. You can bung a JPEG into the data section of a TIFF file and it's just a JPEG by another name. You can use it for vector graphics, which means that instead of storing information about the pixels of an image it stores information about the shapes represented in the image. Naturally, that kind of detail is only useful for simple shapes, like logos. The plus side of that is that vector images are scalable in size without any loss in quality. It isn't very widely used though, which can be a bit of a pain.

    Bitmaps are just that: a giant matrix of pixels. A bitmap contains information about every single pixel in the image. Usually, it's a 24 or 32 bit bitmap, meaning it has 3-4 bytes per pixel. When you're talking images of size 1000x1000 (1 million pixels), you have 3 million bytes, which is approximately 3MB. The data to file size ratio is not good enough for me personally, to make the tradeoff.

  3. #3
    Hypnotising you crono_logical's Avatar
    Join Date
    May 2001
    Location
    Back in Time
    Posts
    9,313
    Contributions
    • Former Administrator
    • Former Cid's Knight

    Default

    I like GIFs for animation, though I'm waiting for more widespread adoption of MNG
    Problems playing downloaded videos? Try CCCP


  4. #4

    Default

    Just make .gif images, they can do animations and support transparency, and can easily make smaller size than any other image types.

  5. #5
    i n v i s i b l e Tech Admin o_O's Avatar
    Join Date
    Jun 2001
    Location
    New Zealand
    Posts
    2,957
    Blog Entries
    1

    FFXIV Character

    Humphrey Squibbles (Sargatanas)

    Default

    My personal favourite is PNG, for the record. MNG will be nice when it's more accessible too.

  6. #6
    Draw the Drapes Recognized Member rubah's Avatar
    Join Date
    Dec 2004
    Location
    Now Destiny is done.
    Posts
    30,653
    Blog Entries
    21
    Contributions
    • Former Administrator
    • Former Cid's Knight

    Default

    256 color pngs will by and large almost always be smaller than 256 color gifs. Unless it's animated then your png will always be smaller since it doesn't do animation 8)

    A rule of thumb: If you have a bitmap image, make it a PNG, you will save somewhere from 50-85% of the file size. If you have GIF, convert it to PNG (if it's not an animation) and you will usually save about -5-10% (yes virginia, there is a negative in front of that five) of the file size (in cases with very small images with very few colors, sometimes GIF comes out smaller, there's not many cases I've seen of that though xD).

  7. #7
    Hypnotising you crono_logical's Avatar
    Join Date
    May 2001
    Location
    Back in Time
    Posts
    9,313
    Contributions
    • Former Administrator
    • Former Cid's Knight

    Default

    PNG has superior transparency than GIF as well, nice blending with the background instead of plain old transparent/not-transparent pixels
    Problems playing downloaded videos? Try CCCP


  8. #8
    tech spirit
    Join Date
    Feb 2003
    Location
    Virgo supercluster
    Posts
    17,950
    Articles
    2
    Blog Entries
    2

    FFXIV Character

    Mirage Askai (Sargatanas)

    Default

    Face, did you say that a jpeg file is recompressed every time it's closed? Isn't it more correct to say that it's recompressed every time it's saved?
    everything is wrapped in gray
    i'm focusing on your image
    can you hear me in the void?

  9. #9
    i n v i s i b l e Tech Admin o_O's Avatar
    Join Date
    Jun 2001
    Location
    New Zealand
    Posts
    2,957
    Blog Entries
    1

    FFXIV Character

    Humphrey Squibbles (Sargatanas)

    Default

    It was my understanding that it was every time the image was opened and closed that decompression/recompression occurred. I could be wrong though, that was off of the top of my head.

  10. #10
    tech spirit
    Join Date
    Feb 2003
    Location
    Virgo supercluster
    Posts
    17,950
    Articles
    2
    Blog Entries
    2

    FFXIV Character

    Mirage Askai (Sargatanas)

    Default

    If that was the case, they'd get reduced to garbage in seconds on 4chan :p.
    everything is wrapped in gray
    i'm focusing on your image
    can you hear me in the void?

  11. #11

    Default

    PNG is the superior format, quality and layers... What more can you ask for ?

    Gif's are good for animation and stuff but the quality sucks pretty bad for non moving images.

    Jpeg's are just crap but small file size (like jpeg) and for some reason the most commonly used format.

  12. #12

    Default

    So basically TIFF is good for preserving the quality of images but not space while with JPEG it's the opposite?
    Quote Originally Posted by o_O View Post
    It was my understanding that it was every time the image was opened and closed that decompression/recompression occurred. I could be wrong though, that was off of the top of my head.
    So you don't know that for sure? Because if that is true then that means that PNG is much better for sigs than JPEG. Personally, I haven't noticed anything too noticable when changing a sig image from a PNG to JPEG file or when I save a JPEG sig image repeatedly.

  13. #13
    i n v i s i b l e Tech Admin o_O's Avatar
    Join Date
    Jun 2001
    Location
    New Zealand
    Posts
    2,957
    Blog Entries
    1

    FFXIV Character

    Humphrey Squibbles (Sargatanas)

    Default

    Nope, I don't know it even slightly for sure. Mirage's point is valid, and if someone presented both hypotheses to me for the first time now, I'd think that whoever came up with mine was on drugs. It's just what I always thought, but I also always thought it was a bit ridiculous.

    Note that even if my hypothesis were true, it wouldn't mean that a sig image would be degraded, since the image that is displayed on a client monitor is downloaded to their computer first, not opened on the server. Also, you'd need to do it a stupid number of times. Like, and unbelievable number.

    Tiff is good for anything really, but not great. PNG is fantastic at being a good image format.

  14. #14
    Draw the Drapes Recognized Member rubah's Avatar
    Join Date
    Dec 2004
    Location
    Now Destiny is done.
    Posts
    30,653
    Blog Entries
    21
    Contributions
    • Former Administrator
    • Former Cid's Knight

    Default

    I'm pretty sure the compression is written into the jpeg file. maybe jpeg2000 has some of that weird stuff, but you can just open a file in an editor and it will be the same every time. Which even if it's not written into the file and is written into the algorithm, comes out to the same result so the point is moot.

  15. #15
    i n v i s i b l e Tech Admin o_O's Avatar
    Join Date
    Jun 2001
    Location
    New Zealand
    Posts
    2,957
    Blog Entries
    1

    FFXIV Character

    Humphrey Squibbles (Sargatanas)

    Default

    The more I think about it, the more ridiculous it seems that a JPEG would be decompressed and recompressed every time you open it. Why would a simple picture viewer have the algorithm to compress a JPEG built into it?

    I even performed bitwise editing of a JPEG image at university.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •