From 9a648cc90b77216060193466f86a3621c0bbb965 Mon Sep 17 00:00:00 2001 From: DRC Date: Sun, 10 Oct 2010 02:48:21 +0000 Subject: [PATCH] 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 --- Makefile.am | 4 ++-- testimgcrop.jpg | Bin 2330 -> 2662 bytes transupp.c | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) 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 1e69c3ae96f1d6bb599644f1e45afac624638658..18fa0b1e5b5916ed67b363335908c5ad53e7ce3a 100644 GIT binary patch delta 1815 zcmV+y2k7{k66O?;qyt<4e6gp<0TA;ThE6JQhMNjiprBS#k)pH31Ofqn4^Gu4@cyP+ z2V)XRj(dvtpAYz&$5ge7PcU)?eDSO)it9a@6#iUQoflQr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&u6J@Uy#{;YvaMMvZkpeLz<+fBdsho*(Mp<>tmHujr<_WpfI9L) z9Y?iI1dR-(2@1*1Nyi_JLxKopBrrJyRFcfsDyu4j>6|d?N2O0PXiA*v%JJCUlU}oH zU_)-XQM3RK5Av)TBzYLSoU!U^0Hhomekx@q%_%Nhw1qe{_zN!l91H+zI-UWQljJdVe0&=wy}$St4SrJt$bPxg)JSMyrhS=eMOx zdYv$#C%GXpNtWBN=bul)m1T>{c>JNiBWw2*=7Ls_%>Wc$2^iz@s`)D4RXF@8)ia_{ z<&V6^F&u;Vk4lY{pSakmmDhGzcMgP8mgXqVJf+xpBN_dA(2hyj?(`_L+$T|y?SEJF z_cB8vBLjFJkf`K@f;Rlhz!CH{ZZr_aso$yknzYR6(vqF;py?1d<5_nwlqb@(9(dGp zYNf@*atvasE!>l_8g?ITdefyPO;;`MK;3Yd4}i zygXMkvIw%LZg{Iq0ub5csQfAv+J6WM__6+#Ey^-V>P~QQ52)-%*14q5YJ%m4qNWRE zocH?Tg*e{F)A`g;gSei+9G^}qSd-1(5EkPU;Rf1096RQRHMV5db3AXf9HWuBKfUze z(SK_lyQ`Ec_yn)_TmJy9O+}8?pq5fk?*Uaq*Jp~$?SnzoOR&R3{LzxcF)@Ngp$^5FL i-O6%vfPE@y-4#e~= 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; } -- 2.40.0