I'd like to create an image a row at a time, where I don't know up front how many rows there will be. I've got code that uses AllocateImage to create a 0x0 image. I then set the number of columns. Then I build the image a row at a time, first incrementing the number of rows in the image by 1 and then calling SetImagePixels/SyncImagePixels to create the row.
This works, but, in the IM source code all the uses of SetImagePixels establish the total number of rows in the image before calling SetImagePixels. I'm concerned that I'm breaking an implicit rule. Is this an acceptable use of the SetImagePixels? If not, what is the correct way to do this?
Creating an image with an unpredictable number of rows
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
You can see its effect from the command line -extent operator, as shown in IM examples.
http://www.cit.gu.edu.au/~anthony/graph ... op/#extent
http://www.cit.gu.edu.au/~anthony/graph ... op/#extent
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/