resize was successful but cannot decrease file size

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
dhwngus
Posts: 1
Joined: 2017-12-11T18:03:22-07:00
Authentication code: 1152

resize was successful but cannot decrease file size

Post by dhwngus » 2017-12-11T18:16:56-07:00

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.

User avatar
fmw42
Posts: 22464
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: resize was successful but cannot decrease file size

Post by fmw42 » 2017-12-11T20:03:40-07:00

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.

snibgo
Posts: 9596
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: resize was successful but cannot decrease file size

Post by snibgo » 2017-12-11T20:04:59-07:00

"-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.
snibgo's IM pages: im.snibgo.com

Post Reply