pytoolbox.multimedia.image.PIL module¶
- pytoolbox.multimedia.image.PIL.apply_orientation(image, get_orientation=<function get_orientation>, sequences={None: [], 1: [], 2: [0], 3: [3], 4: [1], 5: [0, 2], 6: [4], 7: [1, 2], 8: [2]})[source]¶
Credits: https://stackoverflow.com/questions/4228530/pil-thumbnail-is-rotating-my-image.
- pytoolbox.multimedia.image.PIL.remove_transparency(image, background=(255, 255, 255))[source]¶
Return a RGB image with an alpha mask applied to picture + background. If image is already in RGB, then its a no-op.