Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: PNG Image

  1. #11
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    John's right: sorry I took so long to reply, it's a nightmare to find information on this, and the standard is exceptionally unreadable.

    PNG-8 is interesting for the old IEs, but I don't see much point these days. Images should, of course, not be vital for accessibility anyway, since some people can't use them at all, so all using PNG-8 will do is add a very thin layer of fallback between two existing ones, at the cost of limiting image quality.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  2. #12
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    Usually, if it has tansparency and/or fore than 256 colors, I'll use PNG. Otherwise, I use GIF. (GIF's transparecy is 0/100, while PNG's is 0-100.)
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  3. #13
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Well, that's (one of) the point(s). In all the situations where GIF seems appropriate, barring animation, you should be using PNG: it compresses far better, if nothing else.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #14
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    Well, that's (one of) the point(s). In all the situations where GIF seems appropriate, barring animation, you should be using PNG: it compresses far better, if nothing else.
    Not always, but yes usually. With extremely simple and small things, .gif can still be better.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #15
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Oh, you seem to be right. It would be interesting to see exactly where they broke even. I'm guessing that the PNG is larger because of the extra meta-data?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #16
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, I was thinking. You can use a utility like pngcrush to strip out all or most of the non-essential chunks. At that point .png might be better or the same. But the extra effort (unless pngcrush code could be implemented into your default image editor) makes it pointless.

    I do use pngcrush though for png images that are already smaller than the .gif - to get them even smaller, and sometimes to correct (remove) the gamma chunk for IE.
    Last edited by jscheuer1; 02-15-2009 at 07:46 PM. Reason: spelling, general sense
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #17
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    The GIMP's compression routine includes features equivalent to (at least the non-destructive of) pngcrush, and allows one to decline to save gamma information when making a PNG image. I used the GIMP and found that a solid white 4px×4px image as a GIF was roughly the size of the equivalent PNG: 36 bytes compared to 98. Perhaps pngcrush can get it smaller, but I would be fairly surprised.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #18
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I may try your 4 x 4 solid white idea in pngcrush. It has a switch setting:

    Code:
    pngcrush -rem alla
    That takes away everything possible. I think it would ruin complex images, but with a simple image like we are talking about, it would be fine.

    I seem to remember doing similar trials at one point though, and .gif was still smaller.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #19
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I got 37 bytes .gif, 83 bytes .png on my 4x4 solid white image. Using pngcrush provided no further optimization over my image editors (Paint Shop and Optimizer Pro).
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #20
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I guess that's proven then. Not that sixty bytes are worth bothering with. It would be interesting if proportional differences were seen with larger and more complicated images... I wonder where the boundary is exactly?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Tags for this Thread

Bookmarks

Posting Permissions

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