Added preliminary export script functionality for python scripts.

This commit is contained in:
Joey Payne 2015-11-11 09:10:41 -07:00
commit 6124bf436e
6 changed files with 171 additions and 39 deletions

View file

@ -1115,8 +1115,8 @@ class ICNSElement(Structure):
image = Image.open(StringIO(data))
mode_to_bpp = {'1':1, 'L':8, 'P':8, 'RGB':24, 'RGBA':32, 'CMYK':32, 'YCbCr':24, 'I':32, 'F':32}
output = StringIO()
bpp = mode_to_bpp[image.mode]
image.save(output, format='PNG')
bpp = mode_to_bpp[image.mode]
png_data = bytearray(output.getvalue())
icns_info = ICNSInfo()