Take the 2-minute tour ×

Is it possible to reduce the depth of an image using PIL? Say like going to 4bpp from a regular 8bpp.

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

You can easily convert image modes (just call im.convert(newmode) on an image object im, 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.

share|improve this answer
Thanks Alex! Great help as always ! –  Tempus Oct 5 '09 at 18:06
@Geo, you're welcome! –  Alex Martelli Oct 5 '09 at 18:10
add comment

Your Answer


