I wrote a little python script to resize a bunch of png's and the
file size grew from 4.4meg to 38megs! Dimensions were cut in half.
here is a fragment:
cmd = "convert " +path +" -resize 50% " +newpath
print "cmd=" +cmd
os.system(cmd)
Any clues? Also, memory usage grew to 1.6gig during the conversion.
Using windows 6.3.2-Q16
Thanks.
convert blows up png on resize
Re: convert blows up png on resize
Before we can comment, we need to reproduce the problem. Post a URL to one of your PNG images so we can download. We'll let you know if we can the same results.
Re: convert blows up png on resize
Ok,
here is a sample: http://www.andy-lamb.com/danny/12205_10.PNG (original file from BSB2PNG)
output from convert http://www.andy-lamb.com/danny/12205_10_50.PNG (ten times the size)
These are NOAA marine raster charts.
here is a sample: http://www.andy-lamb.com/danny/12205_10.PNG (original file from BSB2PNG)
output from convert http://www.andy-lamb.com/danny/12205_10_50.PNG (ten times the size)
These are NOAA marine raster charts.
Re: convert blows up png on resize
The resize option introduces new colors which reduces opportunities for compression. Use -sample 50% and you will get a reasonably compressed PNG image.
Re: convert blows up png on resize
Ok I'll try that. If this is a common occurrence you might think about adding to FAQ.
Thanks.
Thanks.