Issue
I already know that in memory a single channel image is way smaller than a colored one, something around 1/3 the original size (just guessing). But why after we create a file with that image doesn't the size reduction persist? I did some tests and a colored image with 127 KB after greyscale have 118 KB. Why does this difference happen? And why it is so small?
Solution
If someone ever struggle with this question this is the answer thanks to Mark Setchell and beaker comments.
The problem is that I was trying to map the "in memory" concept of the image, with three channels and so on, with the compression format, but every compression format have his own witchcraft techniques to best represent a image. The JPEG format (the one that I was using) don't is so affected by the colored / gray images difference. But with PNG the difference was around 2.5 times.
Answered By - Will Glück Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.