Page 1 of 1

resize was successful but cannot decrease file size

Posted: 2017-12-11T18:16:56-07:00
by dhwngus
Image
Image

I resized images through your ImageMagick Library in Java.
Most resized images were successful. their file size decreased dramatically.
But some images' file size didn't decreased.

I uploaded sample images that failed to decrease file size.
The original image' file size is 4082kb and resized image(200 x 200)'s file size is 4005kb!!!!!!!!!!

I want to know whether it is a bug or not and why I got this result.
Is there solution to resolve this failed resizing?

Good luck.

Re: resize was successful but cannot decrease file size

Posted: 2017-12-11T20:03:40-07:00
by fmw42
You have a very large xmp profile in your image (Profile-xmp: 4081099 bytes). You also have increased the quality from 74 to 75, which is not likely a big deal. Try adding -strip to your command to remove the profile and other meta data. Or remove the xmp profile, via +profile "xmp".

You also did not say what your exact command was nor your IM version and platform. Please always provide that information when asking questions.

Re: resize was successful but cannot decrease file size

Posted: 2017-12-11T20:04:59-07:00
by snibgo
"-resize" changes the number of pixels in the image. It isn't designed to change the file size.

Most of the data in the input file is non-image data. If you "-strip" it, the size is 11,285 bytes.