From: DRC Date: Sun, 10 Oct 2010 02:48:21 +0000 (+0000) Subject: Fix transpose feature with jpeg v6b code base X-Git-Tag: 1.0.90~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a648cc90b77216060193466f86a3621c0bbb965;p=libjpeg-turbo Fix transpose feature with jpeg v6b code base git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@244 632fc199-4ca6-4c93-a231-07263d6284db --- diff --git a/Makefile.am b/Makefile.am index ac8e65c..a32bd99 100644 --- a/Makefile.am +++ b/Makefile.am @@ -118,7 +118,7 @@ test: testclean all cmp $(srcdir)/testimgp.jpg testoutp.jpg ./jpegtran -outfile testoutt.jpg testoutp.jpg cmp $(srcdir)/testimgint.jpg testoutt.jpg - ./jpegtran -crop 100x100+10+10 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testorig.jpg + ./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testorig.jpg cmp $(srcdir)/testimgcrop.jpg testoutcrop.jpg else @@ -143,7 +143,7 @@ test: testclean all cmp $(srcdir)/testimgp.jpg testoutp.jpg ./jpegtran -outfile testoutt.jpg testoutp.jpg cmp $(srcdir)/testimgint.jpg testoutt.jpg - ./jpegtran -crop 100x100+10+10 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testorig.jpg + ./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testorig.jpg cmp $(srcdir)/testimgcrop.jpg testoutcrop.jpg endif diff --git a/testimgcrop.jpg b/testimgcrop.jpg index 1e69c3a..18fa0b1 100644 Binary files a/testimgcrop.jpg and b/testimgcrop.jpg differ diff --git a/transupp.c b/transupp.c index 0954715..5c31416 100644 --- a/transupp.c +++ b/transupp.c @@ -1369,9 +1369,6 @@ jtransform_adjust_parameters (j_decompress_ptr srcinfo, #if JPEG_LIB_VERSION >= 70 dstinfo->jpeg_width = info->output_width; dstinfo->jpeg_height = info->output_height; -#else - dstinfo->image_width = info->output_width; - dstinfo->image_height = info->output_height; #endif /* Transpose destination image parameters */ @@ -1380,9 +1377,17 @@ jtransform_adjust_parameters (j_decompress_ptr srcinfo, case JXFORM_TRANSVERSE: case JXFORM_ROT_90: case JXFORM_ROT_270: +#if JPEG_LIB_VERSION < 70 + dstinfo->image_width = info->output_height; + dstinfo->image_height = info->output_width; +#endif transpose_critical_parameters(dstinfo); break; default: +#if JPEG_LIB_VERSION < 70 + dstinfo->image_width = info->output_width; + dstinfo->image_height = info->output_height; +#endif break; }