Image Module Bug

Peter dont at emailme.com
Wed Jul 21 23:10:30 EDT 2004


I found a good way of doing this.

In my interface, I use "s#" instead of "s" to read a string along with its
length.  This allows me to pass NULL characters.

"Jim Bob" <jim at bob.com> wrote in message
news:gpaLc.241120$rCA1.188380 at news01.bloor.is.net.cable.rogers.com...
> Hi,
>
> I've got a problem with loading images using the Image Module.  When I
load
> images and then try to pass them to my C++ module using tostring() I get
the
> following error:
>
> TypeError: argument 1 must be string without null bytes, not str
>
> After tearing my hair out I figured out that it was because there was full
> black (0) in my image which was screwing up the NULL string terminator.
>
> Here's my question.  How can I get around this?  Can I pass the raw image
> data in another format?  Can I use the encoder options on the tostring()
> method?  Anyone have any ideas?
>
> This is also a problem when I am trying to do RGBA format because the
alpha
> channel is 0 in transparent places.
>
> Thanks,
> Peter
>
>





More information about the Python-list mailing list