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
This commit is contained in:
@@ -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
|
||||
|
||||
BIN
testimgcrop.jpg
BIN
testimgcrop.jpg
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.6 KiB |
11
transupp.c
11
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user