I have a program whereby the user will enter the url for a picture, then a program in java should zoom out the picture with a width and height which are both multiple of 135px. Can someone help??
for eg this is an image 1100X1121
but i want width and the height of the image to become both multiple of 135 and less than 700px as below, now the image is 675X675 which is both a multiple of 135px and less than 700px:
You can try this simple Java library: Imgscalr
Or is your problem to determine the dimensions of new image?
I am using java-image-scaling-library for scaling and it works fine. It makes it easier to determine the width and/or height of the new image.
(Note that it is most often called "scaling")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.