I'm using Delphi XE, and saving an image to a PNG file. Although the PNGfile code supports the CompressionLevel property, and I have read that PNG compression should be comparable to that of JPG, I find that setting CompressionLevel to 1, and then to 9, makes a very small difference. So my question is, is there a problem in the PNGfile code, or is the compression in PNG a good deal less effective than claimed?

Comments

  1. However note that some PNG optimizers can cause side-effects in rare cases, such as transparency messed up. Had a few examples in our project.

    ReplyDelete
  2. PNG was originally designed as a replacement for both jpeg and gif. Especially gif due to the sudden patent enforcement by Unisys after it had achieved wide spread market penetration.

    It failed to replace either format completely because it was superior to neither. Gif still produces smaller files for graphics with low complexity while jpeg still produced smaller files for those with high complexity. None the less PNG produces smaller files in the medium complexity range (CAD drawings, photos with solid backgrounds, etc). The compression level setting only offers marginal improvements at the expense of processing time.

    PNG is superior to jpeg for editing due to the lossless compression. Of course there are better formats than png for editing that retain layering and composition info.

    ReplyDelete
  3. PNG was never intended to replace JPEG, it was created solely to replace GIF because of the whole Unisys patent debacle. The only thing keeping GIF alive right now is the lack of good APNG tools.

    ReplyDelete

Post a Comment