Is it possible to reduce the depth of an image using PIL? Say like going to 4bpp from a regular 8bpp.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can easily convert image modes (just call
im.convert(newmode)on an image objectim, it will give you a new image of the new required mode), but there’s no mode for “4bpp”; the modes supported are listed here in the The Python Imaging Library Handbook.