1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PNG files bigger size than GIF?

Discussion in 'Photoshop' started by winterheat, Sep 14, 2008.

  1. #1
    A pretty experienced graphics designer at my company told me that PNG is not wildly used because PNG files are bigger than GIF files.

    So at first I thought so, as some of the files saving the screen capture is rather big. However, I just found out that PNG can actually use 8-bit palette too (8-bit indexed colors), and that GIF is based on LZW which only compress better horizontally while PNG compresses well both horizontally and vertically. So I tried converting a GIF file that was 28.5k into a PNG (non-animated, and have transparency) using GIMP. Well yes, it became only about 14.9k.

    So I wonder, is it true that in the graphics community, that sometimes PNG is thought to be larger file size than GIF (and it may be true if that PNG file uses 24 bit color). And then, in reality, when PNG uses 8-bit indexed color, is it almost always that the PNG will be smaller than GIF files? Thanks very much.
     
    winterheat, Sep 14, 2008 IP
  2. winterheat

    winterheat Peon

    Messages:
    125
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    some experiments showed that if the GIF files is bigger-sized, such as 100 x 80 pixel or above, then the PNG version can really reduce the file size, provided that the graphics conversion program does a good job. However, when the GIF file is only a small icon type, like 11 x 11px or 12 x 12px, then GIF seems to be smaller than PNG (590 bytes vs 638 bytes). This may be due to the higher "fixed cost" or the "overhead" of the color table, etc of PNG. The "variable cost" of PNG seems to be smaller than GIF, so that's why bigger GIF can become smaller when converted to PNG. (Update: I tried pngcrush and OptiPNG, and both seemed not as optimized as PNGOUT, which made the PNG file very close to the original GIF, only about 20 bytes more, but the larger PNG, which were already much smaller than the GIF version, can be further reduced in file size by PNGOUT).

    also, a couple of paragraphs in Wikipedia:

     
    winterheat, Sep 14, 2008 IP
  3. Varelse

    Varelse Peon

    Messages:
    177
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You know my opinion about these PNG myths ;)
     
    Varelse, Sep 14, 2008 IP
  4. cipals15

    cipals15 Well-Known Member

    Messages:
    1,085
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    100
    #4
    Is the quality the same when you convert on file type to another and vice versa?
     
    cipals15, Sep 14, 2008 IP
  5. Varelse

    Varelse Peon

    Messages:
    177
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you convert from GIF image to 8-bit PNG, the quality remains the same.
     
    Varelse, Sep 14, 2008 IP
  6. amirsalmani

    amirsalmani Active Member

    Messages:
    292
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #6
    Yes the size of the 8-bit PNG become does less than the 24 bit png, and the size of Gif aprox. same as the 8-bit png.

    But the quality of Edged in Gif and 8 Bit PNG become Crap, it shows white white pixels at the edges.
     
    amirsalmani, Sep 15, 2008 IP
  7. Varelse

    Varelse Peon

    Messages:
    177
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You can change the color your images are matted to, so it matches the background color the images will be displayed on.
     
    Varelse, Sep 15, 2008 IP