[magick-users] square gradient png bigger in size if you save them vertically compared to horizontally

Anthony Thyssen A.Thyssen at griffith.edu.au
Tue Feb 17 02:47:34 UTC 2009


On Mon, 16 Feb 2009 14:41:14 +0100
bw <bwakkie at gmail.com> wrote:

| Hi,
| 
| I read ones on a website (I am looking for the link!!) why a square gradient
| image with its lines horizontally aligned was smaller than the same image
| turned 90 degrees (so the lines are vertically aligned).
| 
| If I am remembering this correctly this had to do due to the fact that the
| compression algorithm scans horizontally per line of pixels and compresses
| the same color pixels.
| 
| Does anybody got a bookmark/link to the explanation page of this behavior?
| 
The pixels are generally stored in image row by row, just the same way
the western world reads english text.

There are many compression techniques however and PNG has at least half
a dozen built into it.  you can select the compression style in PNG using 
the -quality setting (first digit is zip compression, second is the
encoding method used.  So try   90, 91, 92 ,93... etc for different
methods!

The optipng program tries a number of methods to find the best one for
a specific image.



  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
 -----------------------------------------------------------------------------
   If everything seems to be going well,
        you obviously don't know what the hell you are doing.
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/


More information about the Magick-users mailing list