def __init__(self, context):
    super().__init__(context)
    self.subsampling = None
    self.qtables = None
    self.original_mode = None
    self.exif = None
    try:
        if ((self.context.config.MAX_PIXELS is None) or int(self.context.config.MAX_PIXELS)):
            Image.MAX_IMAGE_PIXELS = self.context.config.MAX_PIXELS
    except (AttributeError, TypeError, ValueError):
        logger.info('MAX_PIXELS config variable set to invalid type. Has to be int on None')
def __init__(self, context):
    super().__init__(context)
    self.subsampling = None
    self.qtables = None
    self.original_mode = None
    self.exif = None
    try:
        if ((self.context.config.MAX_PIXELS is None) or int(self.context.config.MAX_PIXELS)):
            Image.MAX_IMAGE_PIXELS = self.context.config.MAX_PIXELS
    except (AttributeError, TypeError, ValueError):
        logger.info('MAX_PIXELS config variable set to invalid type. Has to be int on None')