fix jpeg autorotate for orientation 3

we were not clearing the orientation tag if width and height were
unaltered by the orientation change

see https://github.com/libvips/libvips/discussions/3268

thanks zhifengzhuang
This commit is contained in:
John Cupitt 2023-01-09 10:11:45 +00:00
parent 0500feb465
commit dc78c2c6e4
2 changed files with 6 additions and 4 deletions

View File

@ -1,10 +1,11 @@
xx/1/23 8.14.1
9/1/23 8.14.1
- add vips_thread_isworker() compatibility function [remicollet]
- add vips_semaphore_down_timeout() [kleisauke]
- idle threads are removed after 15s [kleisauke]
- fix version number in gtk-doc index [kleisauke]
- save mono fits images as NAXIS=2 [ewelot]
- fix jpeg `autorotate` for orientation 3 [zhifengzhuang]
22/12/22 8.14.0

View File

@ -979,9 +979,10 @@ vips__jpeg_read( ReadJpeg *jpeg, VipsImage *out, gboolean header_only )
/* Swap width and height if we're going to rotate this image.
*/
if( jpeg->autorotate &&
vips_image_get_orientation_swap( out ) ) {
VIPS_SWAP( int, out->Xsize, out->Ysize );
if( jpeg->autorotate ) {
if( vips_image_get_orientation_swap( out ) )
VIPS_SWAP( int, out->Xsize, out->Ysize );
vips_autorot_remove_angle( out );
}
}