Lino thanks for you answer, you are right, I saw this in handbook:
-----------
"1"1-bit bilevel, stored with the leftmost pixel in the most significant
bit. 0 means black, 1 means white.
-----------
I have been testing, and on saving the image on the hard disk, it stores
with a bit per pixel, but loaded in memory use a byte per pixel.

if the image is black/white with bmp format, should not work PIL only with a
bit per pixel in memory?

thanks again.

On Fri, Mar 7, 2008 at 8:07 AM, Lino Mastrodomenico <
[EMAIL PROTECTED]> wrote:

> 2008/3/3, Juanmi <[EMAIL PROTECTED]>:
> > I need create a big bmp image (b/n) with width 64000 pixels and
> height:48000
> > pixels, but when i try it, PIL return a memory error.
> > This image should have around 350MB so i dont understand the memory
> error.
>
> PIL uses one byte per pixel even for type '1' images, so this requires
> almost 3 GB of memory.
>
> > Someone can help me? Maybe is Windows?
> >
> > Code:
> >
> > import Image
> > white_img = Image.new ('1', (64000,48000),(1))
> > white_img.save('white.bmp')
>
> This works fine on my AMD64 GNU/Linux laptop. You simply need a 64 bit
> architecture and/or a better operating system.
>
> --
> Lino Mastrodomenico
> E-mail: [EMAIL PROTECTED]
>
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to