Skip to content

Qt-Widgets/Image-Cropper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Cropper

Qt Widget for cropping images.

Screenshot

Using:

Use ImageCropper - it's easy. First you need to create instance and configure it:

// Create instance
imageCropper = new ImageCropper(this);

// If you need to fix proportions of cropping rect
// ... set proportions if needed
imageCropper->setProportion(QSize(4,3));
// ... and fix it
imageCropper->setProportionFixed(true);

// Set image for cropping
imageCropper->setImage(QPixmap(":/img.jpg"));

// Set background color under cropped image pane
imageCropper->setBackgroundColor(Qt::lightGray);

// Set border color of cropping rect helper
imageCropper->setCroppingRectBorderColor(Qt::magenta);

And when you need crop image, just do it:

QPixmap croppedImage = imageCropper->cropImage();

Build

Qt 4.6 and greater, or Qt 5.1 and greater

License

GNU LGPL v3

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.5%
  • C 1.5%