Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dc78c2c

Browse files
committed
fix jpeg autorotate for orientation 3
we were not clearing the orientation tag if width and height were unaltered by the orientation change see libvips#3268 thanks zhifengzhuang
1 parent 0500feb commit dc78c2c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ChangeLog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
xx/1/23 8.14.1
1+
9/1/23 8.14.1
22

33
- add vips_thread_isworker() compatibility function [remicollet]
44
- add vips_semaphore_down_timeout() [kleisauke]
55
- idle threads are removed after 15s [kleisauke]
66
- fix version number in gtk-doc index [kleisauke]
77
- save mono fits images as NAXIS=2 [ewelot]
8+
- fix jpeg `autorotate` for orientation 3 [zhifengzhuang]
89

910
22/12/22 8.14.0
1011

libvips/foreign/jpeg2vips.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -979,9 +979,10 @@ vips__jpeg_read( ReadJpeg *jpeg, VipsImage *out, gboolean header_only )
979979

980980
/* Swap width and height if we're going to rotate this image.
981981
*/
982-
if( jpeg->autorotate &&
983-
vips_image_get_orientation_swap( out ) ) {
984-
VIPS_SWAP( int, out->Xsize, out->Ysize );
982+
if( jpeg->autorotate ) {
983+
if( vips_image_get_orientation_swap( out ) )
984+
VIPS_SWAP( int, out->Xsize, out->Ysize );
985+
985986
vips_autorot_remove_angle( out );
986987
}
987988
}

0 commit comments

Comments
 (0)