mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
Merge pull request #48 from manisandro/master
Upstream two patches carried by fedora
This commit is contained in:
commit
c6b484affa
|
@ -364,6 +364,11 @@ def getheader(im, palette=None, info=None):
|
||||||
for i in range(maxcolor):
|
for i in range(maxcolor):
|
||||||
s.append(o8(i) * 3)
|
s.append(o8(i) * 3)
|
||||||
|
|
||||||
|
if im.info.has_key('transparency'):
|
||||||
|
transparentIndex = im.info['transparency']
|
||||||
|
s.append('!' + o8(0xf9) + o8(4) + o8(1) + o8(0) + o8(0) +
|
||||||
|
o8(transparentIndex) + o8(0))
|
||||||
|
|
||||||
return s
|
return s
|
||||||
|
|
||||||
def getdata(im, offset = (0, 0), **params):
|
def getdata(im, offset = (0, 0), **params):
|
||||||
|
|
|
@ -75,7 +75,7 @@ typedef struct ImagingPaletteInstance* ImagingPalette;
|
||||||
struct ImagingMemoryInstance {
|
struct ImagingMemoryInstance {
|
||||||
|
|
||||||
/* Format */
|
/* Format */
|
||||||
char mode[4+1]; /* Band names ("1", "L", "P", "RGB", "RGBA", "CMYK") */
|
char mode[6+1]; /* Band names ("1", "L", "P", "RGB", "RGBA", "CMYK", "YCbCr", "BGR;xy") */
|
||||||
int type; /* Data type (IMAGING_TYPE_*) */
|
int type; /* Data type (IMAGING_TYPE_*) */
|
||||||
int depth; /* Depth (ignored in this version) */
|
int depth; /* Depth (ignored in this version) */
|
||||||
int bands; /* Number of bands (1, 2, 3, or 4) */
|
int bands; /* Number of bands (1, 2, 3, or 4) */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user