Creating an image with an unpredictable number of rows
Posted: 2006-11-29T17:15:57-07:00
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?
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?