I do a lot of restoration work on scanned images. They usually start as .jpg, which are already compressed. After I’ve cleaned them up, I save them as .bmp, so as not to lose any more quality. In a recent discussion on another forum, someone mentioned .png and said it was not as large as a bitmap, and clearer than a .jpg. Is there anything to this? What’s the intended use for .png? Is it lossless, or just a different compression algorithm?
As far as I can tell, PNG is a lossless compresion algorithm. Like winzip or winrar on your computer files, what you get back out is exactly what you put in, but for the majority of pictures, it takes up less space than an uncompressed storage format like bitmaps.
Of course, no lossless compression algorithm can save space on every possible file format - that’d be like pulling extra kilobytes of data out of a white hole - completely impossible. However, the kinds of pictures that would take as much space, or even slightly more, in PNG format are the kinds that people are extremely unlikely to care about - bizarre patterns of colored snow, with every tiny pixelized grain a completely different shade from everything around it.
As long as you can find useful patterns in the visual data, you can use those patterns to find more compact ways of expressing the picture, without losing any level of detail.
I hope that this fits.
PS: Before I started researching it, I wondered if PNG might be sometimes-lossy, like GIF. For simple graphics like it’s meant to handle, GIF is lossless - if there are more complicated photographic details, it becomes lossy, because the pallete must be forced down to 255 shades or whatever.
PNG is indeed lossless in my experience but it doesn’t compress well at all for photographs. Basically, you’re just as well off saving a photograph as a .bmp.
However, for graphics, etc., .PNG works very well and will compress losslessly to an even smaller file size than a .jpg.
From the PNG website:
Thanks, everyone, for the information.
The images I’ve saved in .png so far are about 4 MB smaller than a .bmp, although larger than the original .jpg. I honestly couldn’t tell the difference between two of the same images saved to .bmp and .png. I’m not sure I’d like to use any PNG quality level lower than 10, though. I will definitely go to the website suggested by Bytegeist and read up on the format.
Unless that was a typo, how should you? Both formats are lossless. As long as you saved from the same source, they are identical pixel for pixel.
The level in the PNG format doesn’t indicate quality, just compression. In a lossless format this means that you can trade time spent compressing for a slight reduction in file size but the image won’t change.