[squeak-dev] error inBitBlt with ColorForm

Martin Kuball martinkuball at web.de
Sun Sep 6 18:39:06 UTC 2009


Hi!

I'm creating a ColorForm like this:

	bits := Bitmap new: image size / 4.
	bits copyFromByteArray: image.
	form := ColorForm extent: self area extent depth: 8 bits: bits.
	form colors: self colorMap.

where area is a Rectangle instance and image is a ByteArray with some 
computed image data.

Now sometimes the created form is OK and sometimes I get an error in BitBlt 
when trying to display it or making a PNG file from it. The error seems to 
happen when the width of the form is an odd number. For more details please 
see the attached debug log. You can see that the error appears right away 
when the pixel at 0 at 0 is accessed. But how is the value of width relevant 
here?

Martin


-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug.log
Type: text/x-log
Size: 4353 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090906/9aae4dc5/debug.bin


More information about the Squeak-dev mailing list