Wierd PNG thing

RP
Posted By
Richard Peterson
Dec 24, 2003
Views
323
Replies
1
Status
Closed
Here is something interesting, and a bit strange.

PNG is a lossless compression format.
A 500px by 500px PNG RGB/8 image, all white will take up 4,815 bytes. The same image, but all black will take up 3,446 bytes.
This is as saved by MSPaint, not Photoshop.
Funny thing is, the larger file takes up two 4 KB disk sectors while the smaller file takes up one. So you can store twice as many black ones as white ones on a given drive, even though they are essentially the same image.

Just kinda weird.

-Richard

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

W
westin*nospam
Dec 24, 2003
"Richard Peterson" writes:

Here is something interesting, and a bit strange.

PNG is a lossless compression format.
A 500px by 500px PNG RGB/8 image, all white will take up 4,815 bytes. The same image, but all black will take up 3,446 bytes.
This is as saved by MSPaint, not Photoshop.
Funny thing is, the larger file takes up two 4 KB disk sectors while the smaller file takes up one. So you can store twice as many black ones as white ones on a given drive, even though they are essentially the same image.

Just kinda weird.

Well, nobody said the compression was independent of
content. Presumably the compression scheme makes some assumptions about content, and that makes a difference. Especially for special cases.


-Stephen H. Westin
Any information or opinions in this message are mine: they do not represent the position of Cornell University or any of its sponsors.

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections