views:

73

answers:

1

I have a hundred 10x10 px images, and I want to combine them into a big 100x100 image. I'm using the Image library to first create a blank image and then paste in the smaller images:

blank = Image.new('P',(100,100))
blank.paste(im,box)

The smaller images are in color, but the resulting image turns out in all grayscale. Is there a fix or workaround for this?

+2  A: 

It's probably something to do with using a palette type image (mode P). Is there a specific reason you are doing this? If not, try passing 'RGB' as the first argument.

ezod
Perfect. I was saving it as a PNG, so I thought I should be using mode 'P'. Turns out that's not true. Thanks!
Goose Bumper