[Image-SIG] NameError: name 'RGB' is not defined

Edward Cannon edward at unicornschool.org
Sat Dec 22 01:02:56 CET 2012


you need to quote the RGB,
Image.new("RGB", (600, 600), (250, 250, 400))

On Tue, Nov 6, 2012 at 11:59 AM, Abha Agrawal <abha.n.agrawal at gmail.com> wrote:
> When I run the follwing code:
>
> from PIL import Image
> Image.new(RGB, (600, 600), (250, 250, 400))
>
> it returns
> NameError: name 'RGB' is not defined
>
> Please advise.
>
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
>


More information about the Image-SIG mailing list