mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-07 13:54:45 +03:00
Merge 70a50907c2
into 1d96522932
This commit is contained in:
commit
921120bb7a
|
@ -498,7 +498,7 @@ def _save(im, fp, filename):
|
||||||
else:
|
else:
|
||||||
if subsampling in presets:
|
if subsampling in presets:
|
||||||
subsampling = presets[subsampling].get('subsampling', -1)
|
subsampling = presets[subsampling].get('subsampling', -1)
|
||||||
if qtables in presets:
|
if isStringType(qtables) and qtables in presets:
|
||||||
qtables = presets[qtables].get('quantization')
|
qtables = presets[qtables].get('quantization')
|
||||||
|
|
||||||
if subsampling == "4:4:4":
|
if subsampling == "4:4:4":
|
||||||
|
|
|
@ -230,6 +230,13 @@ def test_quality_keep():
|
||||||
assert_no_exception(lambda: im.save(f, quality='keep'))
|
assert_no_exception(lambda: im.save(f, quality='keep'))
|
||||||
|
|
||||||
|
|
||||||
|
def test_qtables():
|
||||||
|
im = Image.open("Images/lena.jpg")
|
||||||
|
qtables = im.quantization
|
||||||
|
f = tempfile('temp.jpg')
|
||||||
|
assert_no_exception(lambda: im.save(f, qtables=qtables, subsampling=0))
|
||||||
|
|
||||||
|
|
||||||
def test_junk_jpeg_header():
|
def test_junk_jpeg_header():
|
||||||
# https://github.com/python-pillow/Pillow/issues/630
|
# https://github.com/python-pillow/Pillow/issues/630
|
||||||
filename = "Tests/images/junk_jpeg_header.jpg"
|
filename = "Tests/images/junk_jpeg_header.jpg"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user