I am developing a Web Album using Grails and for image processing, I am using grails-image-tools plugin. I need a functionality to resize the images if the uploaded images size is too big (for eg: more than 600 * 840 ) . In this case I need to resize this image to 600 * 840). What is the most efficient way to do this? Thanks a lot.
In BuildConfig.groovy
add a dependency to imgscalr
dependencies {
compile 'org.imgscalr:imgscalr-lib:4.1'
}
Then resizing images becomes a one-liner:
BufferedImage thumbnail = Scalr.resize(image, 150);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With