Skip to content

Commit 444a04e

Browse files
committed
formatting, another MCU test
1 parent 46a67cf commit 444a04e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

libvips/foreign/vips2jpeg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ write_vips( Write *write, int qfac, const char *profile,
613613
*/
614614
if( restart_interval > 0 )
615615
write->cinfo.restart_interval = restart_interval;
616+
616617
#ifdef HAVE_JPEG_EXT_PARAMS
617618
/* Apply trellis quantisation to each 8x8 block. Implies
618619
* "optimize_coding".
@@ -853,7 +854,7 @@ vips__jpeg_write_target( VipsImage *in, VipsTarget *target,
853854
gboolean strip, gboolean trellis_quant,
854855
gboolean overshoot_deringing, gboolean optimize_scans,
855856
int quant_table, VipsForeignSubsample subsample_mode,
856-
int restart_interval)
857+
int restart_interval )
857858
{
858859
Write *write;
859860

test/test-suite/test_foreign.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,12 @@ def test_jpegsave(self):
303303
assert len(r10) > len(r0)
304304
assert len(r2) > len(r10)
305305

306+
# we should be able to reload jpegs with extra MCU markers
307+
im0 = pyvips.Image.jpegload_buffer(r0)
308+
im10 = pyvips.Image.jpegload_buffer(r10)
309+
assert im0.avg() == im10.avg()
310+
311+
306312
@skip_if_no("jpegload")
307313
def test_truncated(self):
308314
# This should open (there's enough there for the header)

0 commit comments

Comments
 (0)