Go to the source code of this file.
§ cropImage()
QImage* cropImage |
( |
QString |
filename, |
|
|
QPoint |
topLeft, |
|
|
QPoint |
bottomRight |
|
) |
| |
Definition at line 36 of file crop.cpp.
Referenced by EditingInterface::crop().
39 QImage origImage( filename );
42 if( origImage.depth() < 32 ) { origImage = origImage.convertDepth( 32, Qt::AutoColor ); }
51 int xCropped, yCropped;
52 uchar *origScanLine, *croppedScanLine;
57 origScanLine = origImage.scanLine(yOrig);
58 croppedScanLine = croppedImage->scanLine(yCropped);
63 *((QRgb*)croppedScanLine+xCropped) = *((QRgb*)origScanLine+xOrig);