
hi,
How can I crop the images using Jmagick
Thanks.

hi,
To crop an image you can use the cropImage() method of MagickImage. Following code explains how an image may cropped
ImageInfo ii = new ImageInfo("abc.jpg");
MagickImage mi = new MagickImage(ii);
double imgWidth = (int)mi.getDimension().width;
double imgHeight = (int)mi.getDimension().height;
System.out.println("Old Image Dimension :- imgWidth:" + imgWidth + " imgHeight:" +imgHeight);
MagickImage cropped = mi.cropImage( new Rectangle (10, 10,
(int)mi.getDimension().width-10, (int)mi.getDimension().width-10));
double newWidth = (int)cropped.getDimension().width;
double newHeight = (int)cropped.getDimension().height;
System.out.println("New cropped image Dimension :- image width : "+ newWidth + "img Height : "+newHeight);