Why thumbnail png file is bigger after original png

I use png format picture file sometimes. It is OK when I upload the file into MovableType platform. I choose make thumbnail to 400px width from about 700px.
Perl ImageMagick engine will create thumbnail file. The blog software will generate html code and put into editor body.
Everything looks find. But the file size of thumbnail png is bigger than original png file.
Original png file: 700X505 49KB
Thumbnail png file: 400X288 78KB
Why is it bigger?


I opened these two files by Adobe photoshop.
Check picture Image Mode.
Original picture: Indexed Color – 8Bits
Thumbnail picture: RGB Color – 8Bits
I do not know why ImageMagick change Image mode when generating thumbnail.
It is Perl ImageMagick on Linux. Actually on Dreamhost.
Is there anyway to modify directive of mt-config.cgi?
When use jpg format picture, the thumbnail file size is OK.
Say 50KB for original file, 21KB for thumbnail.

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

One Reply to “Why thumbnail png file is bigger after original png”

  1. I think I’ve found the problem…
    I was creating thumbnails using php(GD) and observed same thing as you. I was using imagesavealpha($imageResized, true); but default is set to FALSE.
    So, php(GD) was creating my png thumbnails by adding the alpha layer () by default all the way.
    my guess is that you should try to disable the alpha layer when creating thumbnails

Leave a Reply

Your email address will not be published. Required fields are marked *