Vlad the Impala
Vlad the Impala

Reputation: 15872

Strange bug while combining images in Python

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?

Upvotes: 0

Views: 358

Answers (1)

ezod
ezod

Reputation: 7421

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.

Upvotes: 2

Related Questions