0

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?

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.