[Image-SIG] How to store image as black&white bmp (1-bit color scheme)?

Alexander Belchenko bialix at ukr.net
Mon Feb 20 11:31:07 CET 2006


I try to convert with PIL some of my black&white images from 24-bit bmp 
format to 1-bit bmp format. But anyway PIL save converted image as 
24-bit bmp. How to save it as 1-bit? Is PIL support saving bmp as 1-bit?

Here my code example:

import Image

im = Image.open('file-24bit.bmp')
im.convert('1')
im.save('file-1bit.bmp')

But saved file anyway have 24-bit color.
Please, help.

--
Alexander



More information about the Image-SIG mailing list