A size-adjusted shallow copy of the input Pixmap overwritten with the image data of the SubPixmap.
Always use the returned Pixmap structure.
// Same buffer, but new structure: auto pixmap2 = subPixmap.extractToPixmap(pixmap); // Alternatively, replace the old structure: pixmap = subPixmap.extractToPixmap(pixmap);
Copies the pixel data – cropped to the subimage region – into the target Pixmap.