May 2015
Beginner to intermediate
412 pages
8h 44m
English
The imageCropper component provides image-cropping functionality by allowing us to crop a certain region of an image, which could either be a local image or an external image. After cropping, a new image is created. It contains the cropped region and it is assigned to a CroppedImage instance.
The org.primefaces.model.CroppedImage class belongs to the PrimeFaces API, and the structure of the class is as follows:
public class CroppedImage {
String originalFilename;
byte[] bytes;
int left;
int top;
int width;
int height;
}A simple definition of the image cropper for cropping a local image would be as shown in the following code line. The value of the component is bound with an instance of CroppedImage.
<p:imageCropper ...
Read now
Unlock full access