Image Angle and ImageData bugs - avoid crashing!

Jeanne A. E. DeVoto jeanne at runrev.com
Sat Aug 2 18:33:00 EDT 2003


At 4:12 AM -0700 8/2/03, MisterX wrote:
>Why is an imagedata of an new empty image not empty? The template image you
>might imagine but why isn't it empty?
>It happens to be larger than 0 bytes containing only ascII 0 characters...
>Length of imagedata depends on image size (4 0's per pixel - aha - empty
>pixels RGB + alpha!!!
>
>Why isn't it empty?

Because the imageData holds the data for the pixels being displayed (even
if they are all transparent/no color), so it cannot be empty unless the
image has zero width and/or zero size. If the image object has a size, it
has pixels, therefore it has imageData (even all zeros) for each pixel.

However, if you create a new image and look at the text property of the
image, you will see that it's empty until you paint something in the image.

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - Software at the Speed of Thought
http://www.runrev.com/





More information about the metacard mailing list