- use enum string
This commit is contained in:
parent
41d79415b9
commit
22b3a0d161
@ -260,18 +260,14 @@ class TestForeign:
|
||||
|
||||
# higher Q should mean a bigger buffer
|
||||
q10 = im.jpegsave_buffer(Q=10)
|
||||
q10_subsample_off = im.jpegsave_buffer(Q=10, subsample_mode=2)
|
||||
q10_subsample_no = im.jpegsave_buffer(Q=10, no_subsample=1)
|
||||
q10_subsample_no_and_subsample_mode_on = im.jpegsave_buffer(Q=10, no_subsample=1, subsample_mode=1)
|
||||
q10_subsample_off = im.jpegsave_buffer(Q=10, subsample_mode="off")
|
||||
q90 = im.jpegsave_buffer(Q=90)
|
||||
assert len(q90) > len(q10)
|
||||
assert len(q10_subsample_off) > len(q10)
|
||||
assert len(q10_subsample_off) == len(q10_subsample_no)
|
||||
assert len(q10_subsample_no_and_subsample_mode_on) == len(q10_subsample_no)
|
||||
|
||||
# force subsampling should result in smaller buffer
|
||||
q90_subsample_on = im.jpegsave_buffer(Q=90, subsample_mode=1)
|
||||
q90_subsample_auto = im.jpegsave_buffer(Q=90, subsample_mode=0)
|
||||
q90_subsample_on = im.jpegsave_buffer(Q=90, subsample_mode="on")
|
||||
q90_subsample_auto = im.jpegsave_buffer(Q=90, subsample_mode="auto")
|
||||
assert len(q90) > len(q90_subsample_on)
|
||||
assert len(q90) == len(q90_subsample_auto)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user