How to use the pillow.PillowStripper function in pillow

To help you get started, we’ve selected a few pillow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jubalh / MAT / libmat / images.py View on Github external
''' Takes care about pictures formats

References:
    - JFIF: http://www.ecma-international.org/publications/techreports/E-TR-098.htm
    - PNG: http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/PNG.html
    - PNG: http://www.w3.org/TR/PNG-Chunks.html
'''

import parser
import pillow


class ImageStripper(parser.GenericParser, pillow.PillowStripper):
    ''' Common stripper for images.
    Its purpose is to open then save
    images with PIL, the goal being to remove
    unknown metadata.
    '''
    def remove_all(self):
        self.open_and_save()
        super(ImageStripper, self).remove_all()


class JpegStripper(ImageStripper):
    ''' Represents a jpeg file.
        Custom Huffman and Quantization tables
        are stripped: they may leak
        some info, and the quality loss is minor.
    '''

pillow

Python Imaging Library (Fork)

HPND
Latest version published 3 months ago

Package Health Score

94 / 100
Full package analysis

Popular pillow functions