def topic(self): FILTERS_AVAILABLE_BAK = PIL.FILTERS_AVAILABLE PIL.FILTERS_AVAILABLE = False engine = PIL.Engine(None) try: return engine.paste(None, None, True) finally: PIL.FILTERS_AVAILABLE = FILTERS_AVAILABLE_BAK
def topic(self): config = Config() server = ServerParameters(8889, 'localhost', 'thumbor.conf', None, 'info', None) context = Context(server, config, Importer(config)) with open("%s/quantization.jpg" % FIXTURES_FOLDER, "rb") as f: buffer = f.read() engine = PIL.Engine(context=context) engine.load(buffer, '.jpg') return engine
def topic(self): config = Config() server = ServerParameters(8889, 'localhost', 'thumbor.conf', None, 'info', None) config.PILLOW_JPEG_SUBSAMPLING = 2 config.PILLOW_JPEG_QTABLES = 'web_high' context = Context(server, config, Importer(config)) with open("%s/quantization.jpg" % FIXTURES_FOLDER, "rb") as f: buffer = f.read() engine = PIL.Engine(context=context) engine.load(buffer, '.jpg') engine.read('.jpg', None) return engine.image
def topic(self): engine = PIL.Engine(None) engine.image = MockImage('P', 640, 480) engine.resize(320, 240) return engine.image
def topic(self): engine = PIL.Engine(None) engine.image = MockImage('other', 640, 480) engine.resize(160, 120) return engine.image
def topic(self): PIL.FILTERS_AVAILABLE = False engine = PIL.Engine(None) return engine.paste(None, None, True)