Reducing scale of png images usually result in bigger file size

Bug #302057 reported by Silvio Sisto
4
Affects Status Importance Assigned to Milestone
nautilus-image-converter (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: nautilus-image-converter

When reducing scale of PNG images the resulting image's file size usually is usually larger than the original.
Images I resized were wallpapers of 1280x1024. I resized them to 1024x768.
Original image size was around 400kB and resulting file size was 800kB.
Maybe it has something to do with png file compression.

Revision history for this message
Andrew McCarthy (andrewmccarthy) wrote :

The resize is achieved by using ImageMagick to run
    convert <originalfile> -resize <newsize> <newfile>

As noted on this page:
    http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=6245
resizing causes the image to change to 16-bit, probably from 8-bit (run "identify filename.png" at a command prompt to see). I can see why this is done - as the image is shrunk, pixels are merged and new colours created. However, this makes the file larger.

Perhaps the tool should include an option that causes the output to have the same depth as the input? The original image's depth can be determined with:
    "identify -format '%[depth]' filename.png"
which outputs a single integer.

Changed in nautilus-image-converter:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.