I want to create a new image composed of a small rectangular region from an existing image. I can copy all the pixels of the existing image into a new image and then crop the new image, but I wonder if there is a way to avoid copying all those pixels (I need speed).
I'm working with Magick++ but any command-line ideas will be helpful because they might show me how to do it in Magick++.
And if there's no way to do this, might I suggest a new Image constructor that takes a Geometry describing the source sub-image?
All thoughts, ramblings, help will be appreciated.
Faster subimage extraction?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Faster subimage extraction?
If you need to preserve the original image in memory, why not clone it first, then crop it.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/