[Image-SIG] PIL buglet?

Fredrik Lundh fredrik@pythonware.com
Wed, 29 Sep 1999 12:29:41 +0200


(it's wednesday! pil support day!)

Georg Mischler <schorsch@schorsch.com> wrote:
> In Imaging.h, the ImagingMemoryInstance is defined as:
> 
> struct ImagingMemoryInstance {
> 
>     /* Format */
>     char mode[4+1]; /* Band names ("1", "L", "P", "RGB", "RGBA", "CMYK") */
>     int type; /* Data type */
>     int depth; /* Depth (ignored in this version) */
>     int bands; 
> ...
> 
> This allows for mode designators up to 4 characters in length.
> Unfortunately, some of the modes implemented in Storage.c
> have names of up to 6 characters, which may (or may not,
> depending on your compiler) overwrite the type member.

oops.

luckily, it's "may not" on every modern platform
(up to seven characters is ok, thanks to integer
padding).

by various reasons, I'm very reluctant to change
the instance layout before the next major release,
so I guess we have to live with this buglet a while.
it shouldn't affect anything, as far as I can tell.

(which means that your problems must have
been caused by something else).

</F>