Thumbnail creation size is not decreasing very much

babbarkrishan

Registered
Apr 11, 2014
1
0
1
cPanel Access Level
Website Owner
Hi All,
We are using IM4Java library for creating thumbnails. Our code snippet is given below.

IMOperation op = new IMOperation();
op.addImage(sourceFileName);
op.thumbnail(Integer.parseInt(dimension.getWidth()));
op.addImage(destinationFileName);
try {
cmd.run(op);
} catch (Exception e) {
log.debug(e.getMessage());
}

It is working fine and creating thumbnails as expected.
Now in one scenario my thumbnail size (not dimension) is not reduced very much.
My Original image is JPG image with dimension 1306x979 and size 3.64 MB.
I created its thumbnail in dimension 200x150 but its size is 2.65 MB.
On the other hand, when we created same dimension thumbnail using Photoshop its size was just 11 KB.

Where as for another JPG image of size 3.72 MB, its creating thumbnail of size 553 KB.

I think the size of every thumbnail should be below 20 KB as per targeted dimension i.e. 200x150.

Please suggest which option of ImageMagic should we use?

Regards,
Krishan
 

JaredR.

Well-Known Member
Feb 25, 2010
1,834
24
143
Houston, TX
cPanel Access Level
Root Administrator
You will probably get more helpful results if you post on a forum that specializes in site script development using ImageMagick. This forum is dedicated for discussion of the cPanel control panel, which helps automate hosting tasks but is not actually involved in the development of specific site scripts.