lundi 23 février 2015

Image quality issues using Java library imgsclr to RESIZE

I have a problem with quality when I try only to RESIZE an image to a specific width and height using imgsclr 4.2(http://ift.tt/17ry8g1).


I have an image which 240X320 and I have to resize it to 50X75 and 120X180 . I tried both separately using the following code(I am using imgscalr 4.2).



image=resize(image,Method.ULTRA_QUALITY, 50,75, OP_ANTIALIAS, OP_BRIGHTER);
saveImage(image, ImageFormatTypes.JPEG, DESTINATION + RESIZED_IMAGE + “.”+ImageFormatTypes.JPEG);


I have two problems. #1 is very low quality compared to other internal tools I used to resize the image manually. #2. The width increases on the output from 50 to 56 and from 120 to 135 which is weird.


Do you have any idea why these are happening? I appreciate your help.


Aucun commentaire:

Enregistrer un commentaire