diff --git a/.travis.yml b/.travis.yml index 165c328..0f2df7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ before_install: - sudo apt-get install libwebp-dev liblcms2-dev - sudo apt-get install python-numpy python-opencv python-pycurl install: - - pip install tornado==5.1.0 Pillow==2.9.0 coveralls + - pip install tornado==5.1.0 Pillow==5.2.0 coveralls - pip install pep8==1.6.2 pyflakes==0.8.1 before_script: - pep8 --exclude=test pilbox diff --git a/pilbox/image.py b/pilbox/image.py index bb23846..26b5fe2 100644 --- a/pilbox/image.py +++ b/pilbox/image.py @@ -268,21 +268,27 @@ def save(self, **kwargs): save_kwargs["exif"] = self._exif color = color_hex_to_dec_tuple(opts["background"]) + if self.img.mode == "RGBA": self._background(fmt, color) + if fmt == "JPEG": + if self.img.mode == "P": + # Converting old GIF and PNG files to JPEG can raise + # IOError: cannot write mode P as JPEG + # https://mail.python.org/pipermail/python-list/2000-May/036017.html + self.img = self.img.convert("RGB") + elif self.img.mode == "RGBA": + # JPEG does not have an alpha channel so cannot be + # saved as RGBA. It must be converted to RGB. + self.img = self.img.convert("RGB") + if self._orig_format == "JPEG": self.img.format = self._orig_format save_kwargs["subsampling"] = "keep" if opts["quality"] == "keep": save_kwargs["quality"] = "keep" - if fmt == "JPEG" and self.img.mode == 'P': - # Converting old GIF and PNG files to JPEG can raise - # IOError: cannot write mode P as JPEG - # https://mail.python.org/pipermail/python-list/2000-May/036017.html - self.img = self.img.convert("RGB") - try: self.img.save(outfile, fmt, **save_kwargs) except IOError as e: diff --git a/pilbox/test/data/expected/example-500x400-mode=adapt-background=ccc-retain=99.jpg b/pilbox/test/data/expected/example-500x400-mode=adapt-background=ccc-retain=99.jpg index 8187b59..18b6baf 100644 Binary files a/pilbox/test/data/expected/example-500x400-mode=adapt-background=ccc-retain=99.jpg and b/pilbox/test/data/expected/example-500x400-mode=adapt-background=ccc-retain=99.jpg differ diff --git a/pilbox/test/data/expected/example-500x400-mode=adapt-retain=80.jpg b/pilbox/test/data/expected/example-500x400-mode=adapt-retain=80.jpg index bd9e268..fbbca0c 100644 Binary files a/pilbox/test/data/expected/example-500x400-mode=adapt-retain=80.jpg and b/pilbox/test/data/expected/example-500x400-mode=adapt-retain=80.jpg differ diff --git a/pilbox/test/data/expected/example-500x400-mode=clip.jpg b/pilbox/test/data/expected/example-500x400-mode=clip.jpg index e66e6b7..3c9bd6d 100644 Binary files a/pilbox/test/data/expected/example-500x400-mode=clip.jpg and b/pilbox/test/data/expected/example-500x400-mode=clip.jpg differ diff --git a/pilbox/test/data/expected/example-500x400-mode=crop.jpg b/pilbox/test/data/expected/example-500x400-mode=crop.jpg index bd9e268..fbbca0c 100644 Binary files a/pilbox/test/data/expected/example-500x400-mode=crop.jpg and b/pilbox/test/data/expected/example-500x400-mode=crop.jpg differ diff --git a/pilbox/test/data/expected/example-500x400-mode=fill-background=ccc.jpg b/pilbox/test/data/expected/example-500x400-mode=fill-background=ccc.jpg index 8187b59..18b6baf 100644 Binary files a/pilbox/test/data/expected/example-500x400-mode=fill-background=ccc.jpg and b/pilbox/test/data/expected/example-500x400-mode=fill-background=ccc.jpg differ diff --git a/pilbox/test/data/expected/example-500x400-mode=scale.jpg b/pilbox/test/data/expected/example-500x400-mode=scale.jpg index 3fbaff8..51de55a 100644 Binary files a/pilbox/test/data/expected/example-500x400-mode=scale.jpg and b/pilbox/test/data/expected/example-500x400-mode=scale.jpg differ diff --git a/pilbox/test/data/expected/test space-400x300-mode=adapt.jpg b/pilbox/test/data/expected/test space-400x300-mode=adapt.jpg index 9f5d84e..074cd22 100644 Binary files a/pilbox/test/data/expected/test space-400x300-mode=adapt.jpg and b/pilbox/test/data/expected/test space-400x300-mode=adapt.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x-mode=adapt.jpg b/pilbox/test/data/expected/test-advanced-125x-mode=adapt.jpg index 807b060..5bf2848 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x-mode=adapt.jpg and b/pilbox/test/data/expected/test-advanced-125x-mode=adapt.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x-mode=clip.jpg b/pilbox/test/data/expected/test-advanced-125x-mode=clip.jpg index 8a3d32e..e6c3b01 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x-mode=clip.jpg and b/pilbox/test/data/expected/test-advanced-125x-mode=clip.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x-mode=crop.jpg b/pilbox/test/data/expected/test-advanced-125x-mode=crop.jpg index 807b060..5bf2848 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x-mode=crop.jpg and b/pilbox/test/data/expected/test-advanced-125x-mode=crop.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x-mode=fill.jpg b/pilbox/test/data/expected/test-advanced-125x-mode=fill.jpg index 8a3d32e..e6c3b01 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x-mode=fill.jpg and b/pilbox/test/data/expected/test-advanced-125x-mode=fill.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x-mode=scale.jpg b/pilbox/test/data/expected/test-advanced-125x-mode=scale.jpg index 5de041d..b385ed2 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x-mode=scale.jpg and b/pilbox/test/data/expected/test-advanced-125x-mode=scale.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=40.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=40.jpg index aa50622..0adbb6d 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=40.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=40.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=60.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=60.jpg index f06e15d..7157e7e 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=60.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=60.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=80.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=80.jpg index f06e15d..7157e7e 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=80.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=80.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=99.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=99.jpg index f06e15d..7157e7e 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=99.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=adapt-retain=99.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=antialias.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=antialias.jpg index aa50622..0adbb6d 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=antialias.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=antialias.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=bicubic.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=bicubic.jpg index d6be78e..32087b2 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=bicubic.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=bicubic.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=bilinear.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=bilinear.jpg index 7afeb7f..dc7601a 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=bilinear.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=bilinear.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=nearest.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=nearest.jpg index 61c0749..4902f2e 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=nearest.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-filter=nearest.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-optimize=1.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-optimize=1.jpg index 7e8d9b5..32e9a02 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-optimize=1.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-optimize=1.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=0.25,0.25.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=0.25,0.25.jpg index 75fac90..fe6320b 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=0.25,0.25.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=0.25,0.25.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=0.25,0.75.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=0.25,0.75.jpg index 111b921..52fde8c 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=0.25,0.75.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=0.25,0.75.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=bottom-left.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=bottom-left.jpg index 36bc038..7d4d88e 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=bottom-left.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=bottom-left.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=bottom-right.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=bottom-right.jpg index 36bc038..7d4d88e 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=bottom-right.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=bottom-right.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=bottom.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=bottom.jpg index 36bc038..7d4d88e 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=bottom.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=bottom.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=center.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=center.jpg index aa50622..0adbb6d 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=center.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=center.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=face.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=face.jpg index 19ebbe9..2d74105 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=face.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=face.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=left.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=left.jpg index aa50622..0adbb6d 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=left.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=left.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=right.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=right.jpg index aa50622..0adbb6d 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=right.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=right.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=top-left.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=top-left.jpg index 628b0c3..5d19e12 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=top-left.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=top-left.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=top-right.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=top-right.jpg index 628b0c3..5d19e12 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=top-right.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=top-right.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=top.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=top.jpg index 628b0c3..5d19e12 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=top.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-position=top.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-progressive=1.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-progressive=1.jpg index 0a7b454..21e4dae 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-progressive=1.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-progressive=1.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=50.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=50.jpg index c507a93..534d725 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=50.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=50.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=75.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=75.jpg index fb443f4..b62e654 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=75.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=75.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=90.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=90.jpg index aa50622..0adbb6d 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=90.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=90.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=keep.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=keep.jpg index fb443f4..b62e654 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=keep.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop-quality=keep.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop.gif b/pilbox/test/data/expected/test-advanced-125x75-mode=crop.gif index 77c50f0..0cd8ff9 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop.gif and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop.gif differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop.jpeg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop.jpeg index aa50622..0adbb6d 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop.jpeg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop.jpeg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=crop.jpg index aa50622..0adbb6d 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop.png b/pilbox/test/data/expected/test-advanced-125x75-mode=crop.png index 431d5c0..f3bac3a 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop.png and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop.png differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop.tiff b/pilbox/test/data/expected/test-advanced-125x75-mode=crop.tiff index b9d08a6..344d036 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop.tiff and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop.tiff differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=crop.webp b/pilbox/test/data/expected/test-advanced-125x75-mode=crop.webp index 0d4f27e..fe34620 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=crop.webp and b/pilbox/test/data/expected/test-advanced-125x75-mode=crop.webp differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=fill-background=F00.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=fill-background=F00.jpg index 50a338b..beca9ba 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=fill-background=F00.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=fill-background=F00.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-125x75-mode=fill-background=cccccc.jpg b/pilbox/test/data/expected/test-advanced-125x75-mode=fill-background=cccccc.jpg index c597385..67e45dd 100644 Binary files a/pilbox/test/data/expected/test-advanced-125x75-mode=fill-background=cccccc.jpg and b/pilbox/test/data/expected/test-advanced-125x75-mode=fill-background=cccccc.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-x125-mode=adapt.jpg b/pilbox/test/data/expected/test-advanced-x125-mode=adapt.jpg index c90b3b1..a3f1bba 100644 Binary files a/pilbox/test/data/expected/test-advanced-x125-mode=adapt.jpg and b/pilbox/test/data/expected/test-advanced-x125-mode=adapt.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-x125-mode=clip.jpg b/pilbox/test/data/expected/test-advanced-x125-mode=clip.jpg index 162aa48..c137cff 100644 Binary files a/pilbox/test/data/expected/test-advanced-x125-mode=clip.jpg and b/pilbox/test/data/expected/test-advanced-x125-mode=clip.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-x125-mode=crop.jpg b/pilbox/test/data/expected/test-advanced-x125-mode=crop.jpg index c90b3b1..a3f1bba 100644 Binary files a/pilbox/test/data/expected/test-advanced-x125-mode=crop.jpg and b/pilbox/test/data/expected/test-advanced-x125-mode=crop.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-x125-mode=fill.jpg b/pilbox/test/data/expected/test-advanced-x125-mode=fill.jpg index 76927ce..203c373 100644 Binary files a/pilbox/test/data/expected/test-advanced-x125-mode=fill.jpg and b/pilbox/test/data/expected/test-advanced-x125-mode=fill.jpg differ diff --git a/pilbox/test/data/expected/test-advanced-x125-mode=scale.jpg b/pilbox/test/data/expected/test-advanced-x125-mode=scale.jpg index c90b3b1..a3f1bba 100644 Binary files a/pilbox/test/data/expected/test-advanced-x125-mode=scale.jpg and b/pilbox/test/data/expected/test-advanced-x125-mode=scale.jpg differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=000.jpg b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=000.jpg index 7c56c5b..e4e9999 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=000.jpg and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=000.jpg differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=000.png b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=000.png index 00cd40d..af9b747 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=000.png and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=000.png differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=000.webp b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=000.webp index d9337b0..e8053ed 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=000.webp and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=000.webp differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=0fff.jpg b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=0fff.jpg index 25f901c..dca39aa 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=0fff.jpg and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=0fff.jpg differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=0fff.png b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=0fff.png index 0858906..8097a17 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=0fff.png and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=0fff.png differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=0fff.webp b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=0fff.webp index aca956f..7bc2a89 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=0fff.webp and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=0fff.webp differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.gif b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.gif index 4659881..f919e90 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.gif and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.gif differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.jpg b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.jpg index 3da5415..4458bf4 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.jpg and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.jpg differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.png b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.png index e921b21..a4cf95a 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.png and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.png differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.webp b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.webp index 2a0bec7..4c053cd 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.webp and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=a0cccccc.webp differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.gif b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.gif index eb8d614..aaed1d0 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.gif and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.gif differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.jpg b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.jpg index 25f901c..dca39aa 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.jpg and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.jpg differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.png b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.png index 14faf5a..25995fe 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.png and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.png differ diff --git a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.webp b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.webp index 5479e24..3dda276 100644 Binary files a/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.webp and b/pilbox/test/data/expected/test-alpha1-125x125-mode=crop-background=fff.webp differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=000.jpg b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=000.jpg index 7c56c5b..e4e9999 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=000.jpg and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=000.jpg differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=000.png b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=000.png index 00cd40d..af9b747 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=000.png and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=000.png differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=000.webp b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=000.webp index d9337b0..e8053ed 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=000.webp and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=000.webp differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=0fff.jpg b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=0fff.jpg index 25f901c..dca39aa 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=0fff.jpg and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=0fff.jpg differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=0fff.png b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=0fff.png index 0858906..8097a17 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=0fff.png and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=0fff.png differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=0fff.webp b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=0fff.webp index aca956f..7bc2a89 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=0fff.webp and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=0fff.webp differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.gif b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.gif index 4659881..f919e90 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.gif and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.gif differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.jpg b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.jpg index 3da5415..4458bf4 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.jpg and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.jpg differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.png b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.png index e921b21..a4cf95a 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.png and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.png differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.webp b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.webp index 2a0bec7..4c053cd 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.webp and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=a0cccccc.webp differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.gif b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.gif index eb8d614..aaed1d0 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.gif and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.gif differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.jpg b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.jpg index 25f901c..dca39aa 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.jpg and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.jpg differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.png b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.png index 14faf5a..25995fe 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.png and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.png differ diff --git a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.webp b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.webp index 5479e24..3dda276 100644 Binary files a/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.webp and b/pilbox/test/data/expected/test-alpha2-125x125-mode=crop-background=fff.webp differ diff --git a/pilbox/test/data/expected/test-bad-exif-rotate-degree=auto.jpg b/pilbox/test/data/expected/test-bad-exif-rotate-degree=auto.jpg index 6f8dc0a..5f45ff9 100644 Binary files a/pilbox/test/data/expected/test-bad-exif-rotate-degree=auto.jpg and b/pilbox/test/data/expected/test-bad-exif-rotate-degree=auto.jpg differ diff --git a/pilbox/test/data/expected/test-orientation-exif-preserve_exif=0.jpg b/pilbox/test/data/expected/test-orientation-exif-preserve_exif=0.jpg index 42dabcb..b820c5c 100644 Binary files a/pilbox/test/data/expected/test-orientation-exif-preserve_exif=0.jpg and b/pilbox/test/data/expected/test-orientation-exif-preserve_exif=0.jpg differ diff --git a/pilbox/test/data/expected/test-orientation-exif-preserve_exif=1.jpg b/pilbox/test/data/expected/test-orientation-exif-preserve_exif=1.jpg index 94a4e93..063149a 100644 Binary files a/pilbox/test/data/expected/test-orientation-exif-preserve_exif=1.jpg and b/pilbox/test/data/expected/test-orientation-exif-preserve_exif=1.jpg differ diff --git a/pilbox/test/data/expected/test-orientation-rotate-degree=auto.jpg b/pilbox/test/data/expected/test-orientation-rotate-degree=auto.jpg index 9873d38..d0259b4 100644 Binary files a/pilbox/test/data/expected/test-orientation-rotate-degree=auto.jpg and b/pilbox/test/data/expected/test-orientation-rotate-degree=auto.jpg differ diff --git a/pilbox/test/data/expected/test-p-mode-100x100-mode=crop.jpeg b/pilbox/test/data/expected/test-p-mode-100x100-mode=crop.jpeg index 8101f97..1bb9cf0 100644 Binary files a/pilbox/test/data/expected/test-p-mode-100x100-mode=crop.jpeg and b/pilbox/test/data/expected/test-p-mode-100x100-mode=crop.jpeg differ diff --git a/pilbox/test/data/expected/test1-100x200-mode=adapt.jpg b/pilbox/test/data/expected/test1-100x200-mode=adapt.jpg index 882573e..a70695d 100644 Binary files a/pilbox/test/data/expected/test1-100x200-mode=adapt.jpg and b/pilbox/test/data/expected/test1-100x200-mode=adapt.jpg differ diff --git a/pilbox/test/data/expected/test1-100x200-mode=clip.jpg b/pilbox/test/data/expected/test1-100x200-mode=clip.jpg index ab585e7..b50e2f5 100644 Binary files a/pilbox/test/data/expected/test1-100x200-mode=clip.jpg and b/pilbox/test/data/expected/test1-100x200-mode=clip.jpg differ diff --git a/pilbox/test/data/expected/test1-100x200-mode=crop.jpg b/pilbox/test/data/expected/test1-100x200-mode=crop.jpg index 3eb28ae..7b31f9b 100644 Binary files a/pilbox/test/data/expected/test1-100x200-mode=crop.jpg and b/pilbox/test/data/expected/test1-100x200-mode=crop.jpg differ diff --git a/pilbox/test/data/expected/test1-100x200-mode=fill.jpg b/pilbox/test/data/expected/test1-100x200-mode=fill.jpg index 882573e..a70695d 100644 Binary files a/pilbox/test/data/expected/test1-100x200-mode=fill.jpg and b/pilbox/test/data/expected/test1-100x200-mode=fill.jpg differ diff --git a/pilbox/test/data/expected/test1-100x200-mode=scale.jpg b/pilbox/test/data/expected/test1-100x200-mode=scale.jpg index 8ca35db..96d25e3 100644 Binary files a/pilbox/test/data/expected/test1-100x200-mode=scale.jpg and b/pilbox/test/data/expected/test1-100x200-mode=scale.jpg differ diff --git a/pilbox/test/data/expected/test1-200x100-mode=crop-position=center.jpg b/pilbox/test/data/expected/test1-200x100-mode=crop-position=center.jpg index f531744..22697bf 100644 Binary files a/pilbox/test/data/expected/test1-200x100-mode=crop-position=center.jpg and b/pilbox/test/data/expected/test1-200x100-mode=crop-position=center.jpg differ diff --git a/pilbox/test/data/expected/test1-200x100-mode=crop-position=face.jpg b/pilbox/test/data/expected/test1-200x100-mode=crop-position=face.jpg index f531744..22697bf 100644 Binary files a/pilbox/test/data/expected/test1-200x100-mode=crop-position=face.jpg and b/pilbox/test/data/expected/test1-200x100-mode=crop-position=face.jpg differ diff --git a/pilbox/test/data/expected/test1-300x300-mode=adapt.jpg b/pilbox/test/data/expected/test1-300x300-mode=adapt.jpg index 080065e..5da5072 100644 Binary files a/pilbox/test/data/expected/test1-300x300-mode=adapt.jpg and b/pilbox/test/data/expected/test1-300x300-mode=adapt.jpg differ diff --git a/pilbox/test/data/expected/test1-300x300-mode=clip.jpg b/pilbox/test/data/expected/test1-300x300-mode=clip.jpg index 4701a56..c12efe5 100644 Binary files a/pilbox/test/data/expected/test1-300x300-mode=clip.jpg and b/pilbox/test/data/expected/test1-300x300-mode=clip.jpg differ diff --git a/pilbox/test/data/expected/test1-300x300-mode=crop.jpg b/pilbox/test/data/expected/test1-300x300-mode=crop.jpg index 080065e..5da5072 100644 Binary files a/pilbox/test/data/expected/test1-300x300-mode=crop.jpg and b/pilbox/test/data/expected/test1-300x300-mode=crop.jpg differ diff --git a/pilbox/test/data/expected/test1-300x300-mode=fill.jpg b/pilbox/test/data/expected/test1-300x300-mode=fill.jpg index c50a621..fef6acc 100644 Binary files a/pilbox/test/data/expected/test1-300x300-mode=fill.jpg and b/pilbox/test/data/expected/test1-300x300-mode=fill.jpg differ diff --git a/pilbox/test/data/expected/test1-300x300-mode=scale.jpg b/pilbox/test/data/expected/test1-300x300-mode=scale.jpg index 29c994d..7046dc6 100644 Binary files a/pilbox/test/data/expected/test1-300x300-mode=scale.jpg and b/pilbox/test/data/expected/test1-300x300-mode=scale.jpg differ diff --git a/pilbox/test/data/expected/test1-400x300-mode=adapt.jpg b/pilbox/test/data/expected/test1-400x300-mode=adapt.jpg index 9f5d84e..074cd22 100644 Binary files a/pilbox/test/data/expected/test1-400x300-mode=adapt.jpg and b/pilbox/test/data/expected/test1-400x300-mode=adapt.jpg differ diff --git a/pilbox/test/data/expected/test1-400x300-mode=clip.jpg b/pilbox/test/data/expected/test1-400x300-mode=clip.jpg index 4701a56..c12efe5 100644 Binary files a/pilbox/test/data/expected/test1-400x300-mode=clip.jpg and b/pilbox/test/data/expected/test1-400x300-mode=clip.jpg differ diff --git a/pilbox/test/data/expected/test1-400x300-mode=crop.jpg b/pilbox/test/data/expected/test1-400x300-mode=crop.jpg index 6b3544e..fb2502f 100644 Binary files a/pilbox/test/data/expected/test1-400x300-mode=crop.jpg and b/pilbox/test/data/expected/test1-400x300-mode=crop.jpg differ diff --git a/pilbox/test/data/expected/test1-400x300-mode=fill.jpg b/pilbox/test/data/expected/test1-400x300-mode=fill.jpg index 9f5d84e..074cd22 100644 Binary files a/pilbox/test/data/expected/test1-400x300-mode=fill.jpg and b/pilbox/test/data/expected/test1-400x300-mode=fill.jpg differ diff --git a/pilbox/test/data/expected/test1-400x300-mode=scale.jpg b/pilbox/test/data/expected/test1-400x300-mode=scale.jpg index d06e103..0ea7fbc 100644 Binary files a/pilbox/test/data/expected/test1-400x300-mode=scale.jpg and b/pilbox/test/data/expected/test1-400x300-mode=scale.jpg differ diff --git a/pilbox/test/data/expected/test1-chained-region,resize,rotate-150x75-degree=90-rect=50,50,150,150.jpg b/pilbox/test/data/expected/test1-chained-region,resize,rotate-150x75-degree=90-rect=50,50,150,150.jpg index 367e613..fe02daa 100644 Binary files a/pilbox/test/data/expected/test1-chained-region,resize,rotate-150x75-degree=90-rect=50,50,150,150.jpg and b/pilbox/test/data/expected/test1-chained-region,resize,rotate-150x75-degree=90-rect=50,50,150,150.jpg differ diff --git a/pilbox/test/data/expected/test1-chained-region,resize,rotate-75x150-degree=90-rect=50,50,150,150.jpg b/pilbox/test/data/expected/test1-chained-region,resize,rotate-75x150-degree=90-rect=50,50,150,150.jpg index ac1e98d..aa3a119 100644 Binary files a/pilbox/test/data/expected/test1-chained-region,resize,rotate-75x150-degree=90-rect=50,50,150,150.jpg and b/pilbox/test/data/expected/test1-chained-region,resize,rotate-75x150-degree=90-rect=50,50,150,150.jpg differ diff --git a/pilbox/test/data/expected/test1-chained-resize,region,rotate-150x75-degree=90-rect=5,5,65,65.jpg b/pilbox/test/data/expected/test1-chained-resize,region,rotate-150x75-degree=90-rect=5,5,65,65.jpg index 416d96b..4d6c489 100644 Binary files a/pilbox/test/data/expected/test1-chained-resize,region,rotate-150x75-degree=90-rect=5,5,65,65.jpg and b/pilbox/test/data/expected/test1-chained-resize,region,rotate-150x75-degree=90-rect=5,5,65,65.jpg differ diff --git a/pilbox/test/data/expected/test1-chained-resize,region,rotate-75x150-degree=90-rect=5,5,65,65.jpg b/pilbox/test/data/expected/test1-chained-resize,region,rotate-75x150-degree=90-rect=5,5,65,65.jpg index eacbfd8..5f69d20 100644 Binary files a/pilbox/test/data/expected/test1-chained-resize,region,rotate-75x150-degree=90-rect=5,5,65,65.jpg and b/pilbox/test/data/expected/test1-chained-resize,region,rotate-75x150-degree=90-rect=5,5,65,65.jpg differ diff --git a/pilbox/test/data/expected/test1-chained-resize,rotate-150x75-degree=90.jpg b/pilbox/test/data/expected/test1-chained-resize,rotate-150x75-degree=90.jpg index 36a6cc8..bbd4fba 100644 Binary files a/pilbox/test/data/expected/test1-chained-resize,rotate-150x75-degree=90.jpg and b/pilbox/test/data/expected/test1-chained-resize,rotate-150x75-degree=90.jpg differ diff --git a/pilbox/test/data/expected/test1-chained-resize,rotate-75x150-degree=90.jpg b/pilbox/test/data/expected/test1-chained-resize,rotate-75x150-degree=90.jpg index 5dbc1fe..c719008 100644 Binary files a/pilbox/test/data/expected/test1-chained-resize,rotate-75x150-degree=90.jpg and b/pilbox/test/data/expected/test1-chained-resize,rotate-75x150-degree=90.jpg differ diff --git a/pilbox/test/data/expected/test1-chained-rotate,resize-150x75-degree=90.jpg b/pilbox/test/data/expected/test1-chained-rotate,resize-150x75-degree=90.jpg index 36c5415..3c65300 100644 Binary files a/pilbox/test/data/expected/test1-chained-rotate,resize-150x75-degree=90.jpg and b/pilbox/test/data/expected/test1-chained-rotate,resize-150x75-degree=90.jpg differ diff --git a/pilbox/test/data/expected/test1-chained-rotate,resize-75x150-degree=90.jpg b/pilbox/test/data/expected/test1-chained-rotate,resize-75x150-degree=90.jpg index 5ef1ba9..e22a11b 100644 Binary files a/pilbox/test/data/expected/test1-chained-rotate,resize-75x150-degree=90.jpg and b/pilbox/test/data/expected/test1-chained-rotate,resize-75x150-degree=90.jpg differ diff --git a/pilbox/test/data/expected/test1-region-rect=150,150,100,100.jpg b/pilbox/test/data/expected/test1-region-rect=150,150,100,100.jpg index 6210780..0218cf1 100644 Binary files a/pilbox/test/data/expected/test1-region-rect=150,150,100,100.jpg and b/pilbox/test/data/expected/test1-region-rect=150,150,100,100.jpg differ diff --git a/pilbox/test/data/expected/test1-region-rect=200,175,50,50.jpg b/pilbox/test/data/expected/test1-region-rect=200,175,50,50.jpg index 7cda801..c14b2cc 100644 Binary files a/pilbox/test/data/expected/test1-region-rect=200,175,50,50.jpg and b/pilbox/test/data/expected/test1-region-rect=200,175,50,50.jpg differ diff --git a/pilbox/test/data/expected/test1-rotate-degree=180-expand=1.jpg b/pilbox/test/data/expected/test1-rotate-degree=180-expand=1.jpg index 3427d1e..c7835c0 100644 Binary files a/pilbox/test/data/expected/test1-rotate-degree=180-expand=1.jpg and b/pilbox/test/data/expected/test1-rotate-degree=180-expand=1.jpg differ diff --git a/pilbox/test/data/expected/test1-rotate-degree=180.jpg b/pilbox/test/data/expected/test1-rotate-degree=180.jpg index 3427d1e..c7835c0 100644 Binary files a/pilbox/test/data/expected/test1-rotate-degree=180.jpg and b/pilbox/test/data/expected/test1-rotate-degree=180.jpg differ diff --git a/pilbox/test/data/expected/test1-rotate-degree=315-expand=1.jpg b/pilbox/test/data/expected/test1-rotate-degree=315-expand=1.jpg index 9313db0..3afd258 100644 Binary files a/pilbox/test/data/expected/test1-rotate-degree=315-expand=1.jpg and b/pilbox/test/data/expected/test1-rotate-degree=315-expand=1.jpg differ diff --git a/pilbox/test/data/expected/test1-rotate-degree=315.jpg b/pilbox/test/data/expected/test1-rotate-degree=315.jpg index 9e97627..5a76516 100644 Binary files a/pilbox/test/data/expected/test1-rotate-degree=315.jpg and b/pilbox/test/data/expected/test1-rotate-degree=315.jpg differ diff --git a/pilbox/test/data/expected/test1-rotate-degree=90-expand=1.jpg b/pilbox/test/data/expected/test1-rotate-degree=90-expand=1.jpg index 68e063c..60961b6 100644 Binary files a/pilbox/test/data/expected/test1-rotate-degree=90-expand=1.jpg and b/pilbox/test/data/expected/test1-rotate-degree=90-expand=1.jpg differ diff --git a/pilbox/test/data/expected/test1-rotate-degree=90.jpg b/pilbox/test/data/expected/test1-rotate-degree=90.jpg index 68e063c..60961b6 100644 Binary files a/pilbox/test/data/expected/test1-rotate-degree=90.jpg and b/pilbox/test/data/expected/test1-rotate-degree=90.jpg differ diff --git a/pilbox/test/data/expected/test1-rotate-degree=auto.jpg b/pilbox/test/data/expected/test1-rotate-degree=auto.jpg index b661122..b404476 100644 Binary files a/pilbox/test/data/expected/test1-rotate-degree=auto.jpg and b/pilbox/test/data/expected/test1-rotate-degree=auto.jpg differ diff --git a/pilbox/test/data/expected/test2-100x200-mode=adapt.png b/pilbox/test/data/expected/test2-100x200-mode=adapt.png index e20db07..87e2150 100644 Binary files a/pilbox/test/data/expected/test2-100x200-mode=adapt.png and b/pilbox/test/data/expected/test2-100x200-mode=adapt.png differ diff --git a/pilbox/test/data/expected/test2-100x200-mode=clip.png b/pilbox/test/data/expected/test2-100x200-mode=clip.png index c3a97b5..18bb1dc 100644 Binary files a/pilbox/test/data/expected/test2-100x200-mode=clip.png and b/pilbox/test/data/expected/test2-100x200-mode=clip.png differ diff --git a/pilbox/test/data/expected/test2-100x200-mode=crop.png b/pilbox/test/data/expected/test2-100x200-mode=crop.png index 7967db8..ef6669b 100644 Binary files a/pilbox/test/data/expected/test2-100x200-mode=crop.png and b/pilbox/test/data/expected/test2-100x200-mode=crop.png differ diff --git a/pilbox/test/data/expected/test2-100x200-mode=fill.png b/pilbox/test/data/expected/test2-100x200-mode=fill.png index e20db07..87e2150 100644 Binary files a/pilbox/test/data/expected/test2-100x200-mode=fill.png and b/pilbox/test/data/expected/test2-100x200-mode=fill.png differ diff --git a/pilbox/test/data/expected/test2-100x200-mode=scale.png b/pilbox/test/data/expected/test2-100x200-mode=scale.png index e5af2b2..258a9de 100644 Binary files a/pilbox/test/data/expected/test2-100x200-mode=scale.png and b/pilbox/test/data/expected/test2-100x200-mode=scale.png differ diff --git a/pilbox/test/data/expected/test2-200x100-mode=crop-position=center.png b/pilbox/test/data/expected/test2-200x100-mode=crop-position=center.png index 2badff2..0dba8e6 100644 Binary files a/pilbox/test/data/expected/test2-200x100-mode=crop-position=center.png and b/pilbox/test/data/expected/test2-200x100-mode=crop-position=center.png differ diff --git a/pilbox/test/data/expected/test2-200x100-mode=crop-position=face.png b/pilbox/test/data/expected/test2-200x100-mode=crop-position=face.png index 2badff2..0dba8e6 100644 Binary files a/pilbox/test/data/expected/test2-200x100-mode=crop-position=face.png and b/pilbox/test/data/expected/test2-200x100-mode=crop-position=face.png differ diff --git a/pilbox/test/data/expected/test2-300x300-mode=adapt.png b/pilbox/test/data/expected/test2-300x300-mode=adapt.png index e8ef033..6c9b056 100644 Binary files a/pilbox/test/data/expected/test2-300x300-mode=adapt.png and b/pilbox/test/data/expected/test2-300x300-mode=adapt.png differ diff --git a/pilbox/test/data/expected/test2-300x300-mode=clip.png b/pilbox/test/data/expected/test2-300x300-mode=clip.png index 3bae989..8fdc7d2 100644 Binary files a/pilbox/test/data/expected/test2-300x300-mode=clip.png and b/pilbox/test/data/expected/test2-300x300-mode=clip.png differ diff --git a/pilbox/test/data/expected/test2-300x300-mode=crop.png b/pilbox/test/data/expected/test2-300x300-mode=crop.png index e8ef033..6c9b056 100644 Binary files a/pilbox/test/data/expected/test2-300x300-mode=crop.png and b/pilbox/test/data/expected/test2-300x300-mode=crop.png differ diff --git a/pilbox/test/data/expected/test2-300x300-mode=fill.png b/pilbox/test/data/expected/test2-300x300-mode=fill.png index 74c6398..efda364 100644 Binary files a/pilbox/test/data/expected/test2-300x300-mode=fill.png and b/pilbox/test/data/expected/test2-300x300-mode=fill.png differ diff --git a/pilbox/test/data/expected/test2-300x300-mode=scale.png b/pilbox/test/data/expected/test2-300x300-mode=scale.png index f74a6ec..941c584 100644 Binary files a/pilbox/test/data/expected/test2-300x300-mode=scale.png and b/pilbox/test/data/expected/test2-300x300-mode=scale.png differ diff --git a/pilbox/test/data/expected/test2-400x300-mode=adapt.png b/pilbox/test/data/expected/test2-400x300-mode=adapt.png index 566077e..149a8c6 100644 Binary files a/pilbox/test/data/expected/test2-400x300-mode=adapt.png and b/pilbox/test/data/expected/test2-400x300-mode=adapt.png differ diff --git a/pilbox/test/data/expected/test2-400x300-mode=clip.png b/pilbox/test/data/expected/test2-400x300-mode=clip.png index 3bae989..8fdc7d2 100644 Binary files a/pilbox/test/data/expected/test2-400x300-mode=clip.png and b/pilbox/test/data/expected/test2-400x300-mode=clip.png differ diff --git a/pilbox/test/data/expected/test2-400x300-mode=fill.png b/pilbox/test/data/expected/test2-400x300-mode=fill.png index 566077e..149a8c6 100644 Binary files a/pilbox/test/data/expected/test2-400x300-mode=fill.png and b/pilbox/test/data/expected/test2-400x300-mode=fill.png differ diff --git a/pilbox/test/data/expected/test2-400x300-mode=scale.png b/pilbox/test/data/expected/test2-400x300-mode=scale.png index af73387..97409e0 100644 Binary files a/pilbox/test/data/expected/test2-400x300-mode=scale.png and b/pilbox/test/data/expected/test2-400x300-mode=scale.png differ diff --git a/pilbox/test/data/expected/test2-75x125-mode=fill-background=1ccc.png b/pilbox/test/data/expected/test2-75x125-mode=fill-background=1ccc.png index 45c88db..c2dcd8d 100644 Binary files a/pilbox/test/data/expected/test2-75x125-mode=fill-background=1ccc.png and b/pilbox/test/data/expected/test2-75x125-mode=fill-background=1ccc.png differ diff --git a/pilbox/test/data/expected/test2-75x125-mode=fill-background=a0cccccc.png b/pilbox/test/data/expected/test2-75x125-mode=fill-background=a0cccccc.png index a78496f..0bfa693 100644 Binary files a/pilbox/test/data/expected/test2-75x125-mode=fill-background=a0cccccc.png and b/pilbox/test/data/expected/test2-75x125-mode=fill-background=a0cccccc.png differ diff --git a/pilbox/test/data/expected/test3-100x200-mode=adapt.jpg b/pilbox/test/data/expected/test3-100x200-mode=adapt.jpg index 0135610..7583fcf 100644 Binary files a/pilbox/test/data/expected/test3-100x200-mode=adapt.jpg and b/pilbox/test/data/expected/test3-100x200-mode=adapt.jpg differ diff --git a/pilbox/test/data/expected/test3-100x200-mode=clip.jpg b/pilbox/test/data/expected/test3-100x200-mode=clip.jpg index b0c997d..8594d52 100644 Binary files a/pilbox/test/data/expected/test3-100x200-mode=clip.jpg and b/pilbox/test/data/expected/test3-100x200-mode=clip.jpg differ diff --git a/pilbox/test/data/expected/test3-100x200-mode=crop.jpg b/pilbox/test/data/expected/test3-100x200-mode=crop.jpg index 6e5fc05..8dfd382 100644 Binary files a/pilbox/test/data/expected/test3-100x200-mode=crop.jpg and b/pilbox/test/data/expected/test3-100x200-mode=crop.jpg differ diff --git a/pilbox/test/data/expected/test3-100x200-mode=fill.jpg b/pilbox/test/data/expected/test3-100x200-mode=fill.jpg index 0135610..7583fcf 100644 Binary files a/pilbox/test/data/expected/test3-100x200-mode=fill.jpg and b/pilbox/test/data/expected/test3-100x200-mode=fill.jpg differ diff --git a/pilbox/test/data/expected/test3-100x200-mode=scale.jpg b/pilbox/test/data/expected/test3-100x200-mode=scale.jpg index dec7c77..5516522 100644 Binary files a/pilbox/test/data/expected/test3-100x200-mode=scale.jpg and b/pilbox/test/data/expected/test3-100x200-mode=scale.jpg differ diff --git a/pilbox/test/data/expected/test3-200x100-mode=crop-position=center.jpg b/pilbox/test/data/expected/test3-200x100-mode=crop-position=center.jpg index 944b7dc..e0679bd 100644 Binary files a/pilbox/test/data/expected/test3-200x100-mode=crop-position=center.jpg and b/pilbox/test/data/expected/test3-200x100-mode=crop-position=center.jpg differ diff --git a/pilbox/test/data/expected/test3-200x100-mode=crop-position=face.jpg b/pilbox/test/data/expected/test3-200x100-mode=crop-position=face.jpg index f7228c3..3c2928a 100644 Binary files a/pilbox/test/data/expected/test3-200x100-mode=crop-position=face.jpg and b/pilbox/test/data/expected/test3-200x100-mode=crop-position=face.jpg differ diff --git a/pilbox/test/data/expected/test3-300x300-mode=adapt.jpg b/pilbox/test/data/expected/test3-300x300-mode=adapt.jpg index 5fe31dd..cbc05b5 100644 Binary files a/pilbox/test/data/expected/test3-300x300-mode=adapt.jpg and b/pilbox/test/data/expected/test3-300x300-mode=adapt.jpg differ diff --git a/pilbox/test/data/expected/test3-300x300-mode=clip.jpg b/pilbox/test/data/expected/test3-300x300-mode=clip.jpg index 6fd5a69..097a60f 100644 Binary files a/pilbox/test/data/expected/test3-300x300-mode=clip.jpg and b/pilbox/test/data/expected/test3-300x300-mode=clip.jpg differ diff --git a/pilbox/test/data/expected/test3-300x300-mode=crop.jpg b/pilbox/test/data/expected/test3-300x300-mode=crop.jpg index 5fe31dd..cbc05b5 100644 Binary files a/pilbox/test/data/expected/test3-300x300-mode=crop.jpg and b/pilbox/test/data/expected/test3-300x300-mode=crop.jpg differ diff --git a/pilbox/test/data/expected/test3-300x300-mode=fill.jpg b/pilbox/test/data/expected/test3-300x300-mode=fill.jpg index 4f4feb1..f6e0789 100644 Binary files a/pilbox/test/data/expected/test3-300x300-mode=fill.jpg and b/pilbox/test/data/expected/test3-300x300-mode=fill.jpg differ diff --git a/pilbox/test/data/expected/test3-300x300-mode=scale.jpg b/pilbox/test/data/expected/test3-300x300-mode=scale.jpg index 1e8762e..d30efe2 100644 Binary files a/pilbox/test/data/expected/test3-300x300-mode=scale.jpg and b/pilbox/test/data/expected/test3-300x300-mode=scale.jpg differ diff --git a/pilbox/test/data/expected/test3-400x300-mode=adapt.jpg b/pilbox/test/data/expected/test3-400x300-mode=adapt.jpg index 1c3ff4f..b2fb852 100644 Binary files a/pilbox/test/data/expected/test3-400x300-mode=adapt.jpg and b/pilbox/test/data/expected/test3-400x300-mode=adapt.jpg differ diff --git a/pilbox/test/data/expected/test3-400x300-mode=clip.jpg b/pilbox/test/data/expected/test3-400x300-mode=clip.jpg index 6fd5a69..097a60f 100644 Binary files a/pilbox/test/data/expected/test3-400x300-mode=clip.jpg and b/pilbox/test/data/expected/test3-400x300-mode=clip.jpg differ diff --git a/pilbox/test/data/expected/test3-400x300-mode=crop.jpg b/pilbox/test/data/expected/test3-400x300-mode=crop.jpg index 2e7bb94..6b15eba 100644 Binary files a/pilbox/test/data/expected/test3-400x300-mode=crop.jpg and b/pilbox/test/data/expected/test3-400x300-mode=crop.jpg differ diff --git a/pilbox/test/data/expected/test3-400x300-mode=fill.jpg b/pilbox/test/data/expected/test3-400x300-mode=fill.jpg index 1c3ff4f..b2fb852 100644 Binary files a/pilbox/test/data/expected/test3-400x300-mode=fill.jpg and b/pilbox/test/data/expected/test3-400x300-mode=fill.jpg differ diff --git a/pilbox/test/data/expected/test3-400x300-mode=scale.jpg b/pilbox/test/data/expected/test3-400x300-mode=scale.jpg index 6913efb..89d3596 100644 Binary files a/pilbox/test/data/expected/test3-400x300-mode=scale.jpg and b/pilbox/test/data/expected/test3-400x300-mode=scale.jpg differ diff --git a/pilbox/test/data/expected/test4-100x200-mode=adapt.webp b/pilbox/test/data/expected/test4-100x200-mode=adapt.webp index 6eeda62..f108237 100644 Binary files a/pilbox/test/data/expected/test4-100x200-mode=adapt.webp and b/pilbox/test/data/expected/test4-100x200-mode=adapt.webp differ diff --git a/pilbox/test/data/expected/test4-100x200-mode=clip.webp b/pilbox/test/data/expected/test4-100x200-mode=clip.webp index 8d8ee86..c3a7654 100644 Binary files a/pilbox/test/data/expected/test4-100x200-mode=clip.webp and b/pilbox/test/data/expected/test4-100x200-mode=clip.webp differ diff --git a/pilbox/test/data/expected/test4-100x200-mode=crop.webp b/pilbox/test/data/expected/test4-100x200-mode=crop.webp index 37937cd..b5a31e9 100644 Binary files a/pilbox/test/data/expected/test4-100x200-mode=crop.webp and b/pilbox/test/data/expected/test4-100x200-mode=crop.webp differ diff --git a/pilbox/test/data/expected/test4-100x200-mode=fill.webp b/pilbox/test/data/expected/test4-100x200-mode=fill.webp index 6eeda62..f108237 100644 Binary files a/pilbox/test/data/expected/test4-100x200-mode=fill.webp and b/pilbox/test/data/expected/test4-100x200-mode=fill.webp differ diff --git a/pilbox/test/data/expected/test4-100x200-mode=scale.webp b/pilbox/test/data/expected/test4-100x200-mode=scale.webp index 6f98ea2..f579f70 100644 Binary files a/pilbox/test/data/expected/test4-100x200-mode=scale.webp and b/pilbox/test/data/expected/test4-100x200-mode=scale.webp differ diff --git a/pilbox/test/data/expected/test4-200x100-mode=crop-position=center.webp b/pilbox/test/data/expected/test4-200x100-mode=crop-position=center.webp index afad0b9..074b8e2 100644 Binary files a/pilbox/test/data/expected/test4-200x100-mode=crop-position=center.webp and b/pilbox/test/data/expected/test4-200x100-mode=crop-position=center.webp differ diff --git a/pilbox/test/data/expected/test4-200x100-mode=crop-position=face.webp b/pilbox/test/data/expected/test4-200x100-mode=crop-position=face.webp index afad0b9..074b8e2 100644 Binary files a/pilbox/test/data/expected/test4-200x100-mode=crop-position=face.webp and b/pilbox/test/data/expected/test4-200x100-mode=crop-position=face.webp differ diff --git a/pilbox/test/data/expected/test4-300x300-mode=adapt.webp b/pilbox/test/data/expected/test4-300x300-mode=adapt.webp index 9f42cb1..9a8de3b 100644 Binary files a/pilbox/test/data/expected/test4-300x300-mode=adapt.webp and b/pilbox/test/data/expected/test4-300x300-mode=adapt.webp differ diff --git a/pilbox/test/data/expected/test4-300x300-mode=clip.webp b/pilbox/test/data/expected/test4-300x300-mode=clip.webp index 34b6e4c..90cf358 100644 Binary files a/pilbox/test/data/expected/test4-300x300-mode=clip.webp and b/pilbox/test/data/expected/test4-300x300-mode=clip.webp differ diff --git a/pilbox/test/data/expected/test4-300x300-mode=crop.webp b/pilbox/test/data/expected/test4-300x300-mode=crop.webp index 7ed6dd4..2aa60a7 100644 Binary files a/pilbox/test/data/expected/test4-300x300-mode=crop.webp and b/pilbox/test/data/expected/test4-300x300-mode=crop.webp differ diff --git a/pilbox/test/data/expected/test4-300x300-mode=fill.webp b/pilbox/test/data/expected/test4-300x300-mode=fill.webp index 9f42cb1..9a8de3b 100644 Binary files a/pilbox/test/data/expected/test4-300x300-mode=fill.webp and b/pilbox/test/data/expected/test4-300x300-mode=fill.webp differ diff --git a/pilbox/test/data/expected/test4-300x300-mode=scale.webp b/pilbox/test/data/expected/test4-300x300-mode=scale.webp index f7826b0..caa2d80 100644 Binary files a/pilbox/test/data/expected/test4-300x300-mode=scale.webp and b/pilbox/test/data/expected/test4-300x300-mode=scale.webp differ diff --git a/pilbox/test/data/expected/test4-400x300-mode=adapt.webp b/pilbox/test/data/expected/test4-400x300-mode=adapt.webp index de42fe5..2c50f96 100644 Binary files a/pilbox/test/data/expected/test4-400x300-mode=adapt.webp and b/pilbox/test/data/expected/test4-400x300-mode=adapt.webp differ diff --git a/pilbox/test/data/expected/test4-400x300-mode=clip.webp b/pilbox/test/data/expected/test4-400x300-mode=clip.webp index 4db7074..946d253 100644 Binary files a/pilbox/test/data/expected/test4-400x300-mode=clip.webp and b/pilbox/test/data/expected/test4-400x300-mode=clip.webp differ diff --git a/pilbox/test/data/expected/test4-400x300-mode=crop.webp b/pilbox/test/data/expected/test4-400x300-mode=crop.webp index de42fe5..2c50f96 100644 Binary files a/pilbox/test/data/expected/test4-400x300-mode=crop.webp and b/pilbox/test/data/expected/test4-400x300-mode=crop.webp differ diff --git a/pilbox/test/data/expected/test4-400x300-mode=fill.webp b/pilbox/test/data/expected/test4-400x300-mode=fill.webp index 69c4b3e..050201f 100644 Binary files a/pilbox/test/data/expected/test4-400x300-mode=fill.webp and b/pilbox/test/data/expected/test4-400x300-mode=fill.webp differ diff --git a/pilbox/test/data/expected/test4-400x300-mode=scale.webp b/pilbox/test/data/expected/test4-400x300-mode=scale.webp index a019c97..a9bad87 100644 Binary files a/pilbox/test/data/expected/test4-400x300-mode=scale.webp and b/pilbox/test/data/expected/test4-400x300-mode=scale.webp differ diff --git a/pilbox/test/data/expected/test5-100x200-mode=adapt.gif b/pilbox/test/data/expected/test5-100x200-mode=adapt.gif index 5077d54..d2c46a9 100644 Binary files a/pilbox/test/data/expected/test5-100x200-mode=adapt.gif and b/pilbox/test/data/expected/test5-100x200-mode=adapt.gif differ diff --git a/pilbox/test/data/expected/test5-100x200-mode=clip.gif b/pilbox/test/data/expected/test5-100x200-mode=clip.gif index 4e3d2e3..bb39bef 100644 Binary files a/pilbox/test/data/expected/test5-100x200-mode=clip.gif and b/pilbox/test/data/expected/test5-100x200-mode=clip.gif differ diff --git a/pilbox/test/data/expected/test5-100x200-mode=crop.gif b/pilbox/test/data/expected/test5-100x200-mode=crop.gif index df37c5e..99bc104 100644 Binary files a/pilbox/test/data/expected/test5-100x200-mode=crop.gif and b/pilbox/test/data/expected/test5-100x200-mode=crop.gif differ diff --git a/pilbox/test/data/expected/test5-100x200-mode=fill.gif b/pilbox/test/data/expected/test5-100x200-mode=fill.gif index 5077d54..d2c46a9 100644 Binary files a/pilbox/test/data/expected/test5-100x200-mode=fill.gif and b/pilbox/test/data/expected/test5-100x200-mode=fill.gif differ diff --git a/pilbox/test/data/expected/test5-100x200-mode=scale.gif b/pilbox/test/data/expected/test5-100x200-mode=scale.gif index 2341f37..e98b166 100644 Binary files a/pilbox/test/data/expected/test5-100x200-mode=scale.gif and b/pilbox/test/data/expected/test5-100x200-mode=scale.gif differ diff --git a/pilbox/test/data/expected/test5-200x100-mode=crop-position=center.gif b/pilbox/test/data/expected/test5-200x100-mode=crop-position=center.gif index 06e202d..3a9fe0a 100644 Binary files a/pilbox/test/data/expected/test5-200x100-mode=crop-position=center.gif and b/pilbox/test/data/expected/test5-200x100-mode=crop-position=center.gif differ diff --git a/pilbox/test/data/expected/test5-200x100-mode=crop-position=face.gif b/pilbox/test/data/expected/test5-200x100-mode=crop-position=face.gif index 06e202d..3a9fe0a 100644 Binary files a/pilbox/test/data/expected/test5-200x100-mode=crop-position=face.gif and b/pilbox/test/data/expected/test5-200x100-mode=crop-position=face.gif differ diff --git a/pilbox/test/data/expected/test5-300x300-mode=adapt.gif b/pilbox/test/data/expected/test5-300x300-mode=adapt.gif index b56c262..9122d72 100644 Binary files a/pilbox/test/data/expected/test5-300x300-mode=adapt.gif and b/pilbox/test/data/expected/test5-300x300-mode=adapt.gif differ diff --git a/pilbox/test/data/expected/test5-300x300-mode=clip.gif b/pilbox/test/data/expected/test5-300x300-mode=clip.gif index 51ca7d8..30eacc2 100644 Binary files a/pilbox/test/data/expected/test5-300x300-mode=clip.gif and b/pilbox/test/data/expected/test5-300x300-mode=clip.gif differ diff --git a/pilbox/test/data/expected/test5-300x300-mode=crop.gif b/pilbox/test/data/expected/test5-300x300-mode=crop.gif index 9bc685b..6a2d90f 100644 Binary files a/pilbox/test/data/expected/test5-300x300-mode=crop.gif and b/pilbox/test/data/expected/test5-300x300-mode=crop.gif differ diff --git a/pilbox/test/data/expected/test5-300x300-mode=fill.gif b/pilbox/test/data/expected/test5-300x300-mode=fill.gif index b56c262..9122d72 100644 Binary files a/pilbox/test/data/expected/test5-300x300-mode=fill.gif and b/pilbox/test/data/expected/test5-300x300-mode=fill.gif differ diff --git a/pilbox/test/data/expected/test5-300x300-mode=scale.gif b/pilbox/test/data/expected/test5-300x300-mode=scale.gif index 5d8bdae..b1c4a39 100644 Binary files a/pilbox/test/data/expected/test5-300x300-mode=scale.gif and b/pilbox/test/data/expected/test5-300x300-mode=scale.gif differ diff --git a/pilbox/test/data/expected/test5-400x300-mode=adapt.gif b/pilbox/test/data/expected/test5-400x300-mode=adapt.gif index 7156e94..fe7fb8a 100644 Binary files a/pilbox/test/data/expected/test5-400x300-mode=adapt.gif and b/pilbox/test/data/expected/test5-400x300-mode=adapt.gif differ diff --git a/pilbox/test/data/expected/test5-400x300-mode=clip.gif b/pilbox/test/data/expected/test5-400x300-mode=clip.gif index 8fcbcc8..29b6b0d 100644 Binary files a/pilbox/test/data/expected/test5-400x300-mode=clip.gif and b/pilbox/test/data/expected/test5-400x300-mode=clip.gif differ diff --git a/pilbox/test/data/expected/test5-400x300-mode=crop.gif b/pilbox/test/data/expected/test5-400x300-mode=crop.gif index 7156e94..fe7fb8a 100644 Binary files a/pilbox/test/data/expected/test5-400x300-mode=crop.gif and b/pilbox/test/data/expected/test5-400x300-mode=crop.gif differ diff --git a/pilbox/test/data/expected/test5-400x300-mode=fill.gif b/pilbox/test/data/expected/test5-400x300-mode=fill.gif index f0b11ee..cb8c63e 100644 Binary files a/pilbox/test/data/expected/test5-400x300-mode=fill.gif and b/pilbox/test/data/expected/test5-400x300-mode=fill.gif differ diff --git a/pilbox/test/data/expected/test5-400x300-mode=scale.gif b/pilbox/test/data/expected/test5-400x300-mode=scale.gif index 89ae77e..57ad375 100644 Binary files a/pilbox/test/data/expected/test5-400x300-mode=scale.gif and b/pilbox/test/data/expected/test5-400x300-mode=scale.gif differ diff --git a/pilbox/test/data/expected/test6-100x200-mode=adapt.tif b/pilbox/test/data/expected/test6-100x200-mode=adapt.tif index 590b6cf..e8a0a4e 100644 Binary files a/pilbox/test/data/expected/test6-100x200-mode=adapt.tif and b/pilbox/test/data/expected/test6-100x200-mode=adapt.tif differ diff --git a/pilbox/test/data/expected/test6-100x200-mode=clip.tif b/pilbox/test/data/expected/test6-100x200-mode=clip.tif index 499a99d..588ea31 100644 Binary files a/pilbox/test/data/expected/test6-100x200-mode=clip.tif and b/pilbox/test/data/expected/test6-100x200-mode=clip.tif differ diff --git a/pilbox/test/data/expected/test6-100x200-mode=crop.tif b/pilbox/test/data/expected/test6-100x200-mode=crop.tif index 91a3d24..902baea 100644 Binary files a/pilbox/test/data/expected/test6-100x200-mode=crop.tif and b/pilbox/test/data/expected/test6-100x200-mode=crop.tif differ diff --git a/pilbox/test/data/expected/test6-100x200-mode=fill.tif b/pilbox/test/data/expected/test6-100x200-mode=fill.tif index 590b6cf..e8a0a4e 100644 Binary files a/pilbox/test/data/expected/test6-100x200-mode=fill.tif and b/pilbox/test/data/expected/test6-100x200-mode=fill.tif differ diff --git a/pilbox/test/data/expected/test6-100x200-mode=scale.tif b/pilbox/test/data/expected/test6-100x200-mode=scale.tif index 83edbb7..0361213 100644 Binary files a/pilbox/test/data/expected/test6-100x200-mode=scale.tif and b/pilbox/test/data/expected/test6-100x200-mode=scale.tif differ diff --git a/pilbox/test/data/expected/test6-200x100-mode=crop-position=center.tif b/pilbox/test/data/expected/test6-200x100-mode=crop-position=center.tif index cb14da3..c198fe9 100644 Binary files a/pilbox/test/data/expected/test6-200x100-mode=crop-position=center.tif and b/pilbox/test/data/expected/test6-200x100-mode=crop-position=center.tif differ diff --git a/pilbox/test/data/expected/test6-200x100-mode=crop-position=face.tif b/pilbox/test/data/expected/test6-200x100-mode=crop-position=face.tif index cb14da3..c198fe9 100644 Binary files a/pilbox/test/data/expected/test6-200x100-mode=crop-position=face.tif and b/pilbox/test/data/expected/test6-200x100-mode=crop-position=face.tif differ diff --git a/pilbox/test/data/expected/test6-300x300-mode=adapt.tif b/pilbox/test/data/expected/test6-300x300-mode=adapt.tif index 691e97d..6fa9940 100644 Binary files a/pilbox/test/data/expected/test6-300x300-mode=adapt.tif and b/pilbox/test/data/expected/test6-300x300-mode=adapt.tif differ diff --git a/pilbox/test/data/expected/test6-300x300-mode=clip.tif b/pilbox/test/data/expected/test6-300x300-mode=clip.tif index 0860746..c5317b3 100644 Binary files a/pilbox/test/data/expected/test6-300x300-mode=clip.tif and b/pilbox/test/data/expected/test6-300x300-mode=clip.tif differ diff --git a/pilbox/test/data/expected/test6-300x300-mode=crop.tif b/pilbox/test/data/expected/test6-300x300-mode=crop.tif index 691e97d..6fa9940 100644 Binary files a/pilbox/test/data/expected/test6-300x300-mode=crop.tif and b/pilbox/test/data/expected/test6-300x300-mode=crop.tif differ diff --git a/pilbox/test/data/expected/test6-300x300-mode=fill.tif b/pilbox/test/data/expected/test6-300x300-mode=fill.tif index 93609af..030aa4e 100644 Binary files a/pilbox/test/data/expected/test6-300x300-mode=fill.tif and b/pilbox/test/data/expected/test6-300x300-mode=fill.tif differ diff --git a/pilbox/test/data/expected/test6-300x300-mode=scale.tif b/pilbox/test/data/expected/test6-300x300-mode=scale.tif index 88ed177..27e632f 100644 Binary files a/pilbox/test/data/expected/test6-300x300-mode=scale.tif and b/pilbox/test/data/expected/test6-300x300-mode=scale.tif differ diff --git a/pilbox/test/data/expected/test6-400x300-mode=adapt.tif b/pilbox/test/data/expected/test6-400x300-mode=adapt.tif index ebc04ab..eb125a0 100644 Binary files a/pilbox/test/data/expected/test6-400x300-mode=adapt.tif and b/pilbox/test/data/expected/test6-400x300-mode=adapt.tif differ diff --git a/pilbox/test/data/expected/test6-400x300-mode=clip.tif b/pilbox/test/data/expected/test6-400x300-mode=clip.tif index 0860746..c5317b3 100644 Binary files a/pilbox/test/data/expected/test6-400x300-mode=clip.tif and b/pilbox/test/data/expected/test6-400x300-mode=clip.tif differ diff --git a/pilbox/test/data/expected/test6-400x300-mode=crop.tif b/pilbox/test/data/expected/test6-400x300-mode=crop.tif index 5cc3ff3..eb5bfd4 100644 Binary files a/pilbox/test/data/expected/test6-400x300-mode=crop.tif and b/pilbox/test/data/expected/test6-400x300-mode=crop.tif differ diff --git a/pilbox/test/data/expected/test6-400x300-mode=fill.tif b/pilbox/test/data/expected/test6-400x300-mode=fill.tif index ebc04ab..eb125a0 100644 Binary files a/pilbox/test/data/expected/test6-400x300-mode=fill.tif and b/pilbox/test/data/expected/test6-400x300-mode=fill.tif differ diff --git a/pilbox/test/data/expected/test6-400x300-mode=scale.tif b/pilbox/test/data/expected/test6-400x300-mode=scale.tif index 42eae2e..39fb9af 100644 Binary files a/pilbox/test/data/expected/test6-400x300-mode=scale.tif and b/pilbox/test/data/expected/test6-400x300-mode=scale.tif differ diff --git a/pilbox/test/image_test.py b/pilbox/test/image_test.py index 72fb4c9..a2158f3 100644 --- a/pilbox/test/image_test.py +++ b/pilbox/test/image_test.py @@ -11,6 +11,7 @@ from pilbox import errors from pilbox.image import color_hex_to_dec_tuple, Image + try: import cv except ImportError: @@ -321,6 +322,9 @@ def test_invalid_color_hex_to_dec_tuple(self): def test_save_failure(self): img = Image(os.path.join(DATADIR, 'test5.gif')) + def _mock_save(*args, **kwargs): + raise IOError('foo') + img.img.save = _mock_save self.assertRaises(errors.ImageSaveError, lambda: img.save(format="webp")) diff --git a/provisioning/playbook.yml b/provisioning/playbook.yml index 34c6453..396cc7d 100644 --- a/provisioning/playbook.yml +++ b/provisioning/playbook.yml @@ -52,7 +52,7 @@ version={{ item.version }} use_mirrors=yes with_items: - - { name: 'Pillow', version: '2.9.0' } + - { name: 'Pillow', version: '5.2.0' } - { name: 'tornado', version: '5.1.0' } - { name: 'coverage', version: '3.6' } - { name: 'pep8', version: '1.6.2' } diff --git a/setup.py b/setup.py index ceefa81..b2add82 100644 --- a/setup.py +++ b/setup.py @@ -43,8 +43,8 @@ def run(self): 'pilbox': ['frontalface.xml'], }, install_requires=[ - 'Pillow==2.9.0', 'tornado==5.1.0', + 'Pillow==5.2.0', 'sphinx-me==0.2.1', ], extras_require = {