Unusual result while using GetPixel
Posted: 2013-01-10T19:22:49-07:00
Hi,
I am right now using PerlMagick to iterate through the pixels of an image. I'm doing something super basic - just taking an image, iterating through the pixels and outputting the result as an HTML table. We've all seen this before... but I'm running into a problem.
So basically if I parse the pixels AFTER performing a "Write" operation, the GetPixel call returns back the expected data, and I then can generate a correct HTML Table that represents my image. However if I remove that "Write" call, the results are messed up. Basically the color information appears to be in the wrong format or something.
I compared the two different results, and they are quite different. I'm sure I'm doing something wrong, setting some type of output format or something that Write() must be performing... but I cannot find it in the docs anywhere.
Ideas?
thanks in advance!
I am right now using PerlMagick to iterate through the pixels of an image. I'm doing something super basic - just taking an image, iterating through the pixels and outputting the result as an HTML table. We've all seen this before... but I'm running into a problem.
So basically if I parse the pixels AFTER performing a "Write" operation, the GetPixel call returns back the expected data, and I then can generate a correct HTML Table that represents my image. However if I remove that "Write" call, the results are messed up. Basically the color information appears to be in the wrong format or something.
I compared the two different results, and they are quite different. I'm sure I'm doing something wrong, setting some type of output format or something that Write() must be performing... but I cannot find it in the docs anywhere.
Ideas?
thanks in advance!