imagejavax.imageioimgscalr

How to set crop starting position with imgscalr?


I have tried to use imgscalr library with the following crop method:

Scalr.crop(image, height, width);

But it always crops starting at the left upper corner of the image. Can I tweak this behavior to start in the right bottom corner or center?


Solution

  • Definitely - just use the other crop operation that takes x,y,width,height arguments.