formatting, another MCU test

This commit is contained in:
John Cupitt 2021-10-08 17:58:17 +01:00
parent 46a67cfab9
commit 444a04e94f
2 changed files with 8 additions and 1 deletions

View File

@ -613,6 +613,7 @@ write_vips( Write *write, int qfac, const char *profile,
*/
if( restart_interval > 0 )
write->cinfo.restart_interval = restart_interval;
#ifdef HAVE_JPEG_EXT_PARAMS
/* Apply trellis quantisation to each 8x8 block. Implies
* "optimize_coding".
@ -853,7 +854,7 @@ vips__jpeg_write_target( VipsImage *in, VipsTarget *target,
gboolean strip, gboolean trellis_quant,
gboolean overshoot_deringing, gboolean optimize_scans,
int quant_table, VipsForeignSubsample subsample_mode,
int restart_interval)
int restart_interval )
{
Write *write;

View File

@ -303,6 +303,12 @@ class TestForeign:
assert len(r10) > len(r0)
assert len(r2) > len(r10)
# we should be able to reload jpegs with extra MCU markers
im0 = pyvips.Image.jpegload_buffer(r0)
im10 = pyvips.Image.jpegload_buffer(r10)
assert im0.avg() == im10.avg()
@skip_if_no("jpegload")
def test_truncated(self):
# This should open (there's enough there for the header)