Skip to content

JPEG autorotate doesn't rotate thumbnail #1865

@tonimelisma

Description

@tonimelisma

When I try to autorotate a jpg image with vips, the image itself is autorotated perfectly and the EXIF orientation tag properly reset to 1, but the thumbnail itself isn't autorotated. Because the EXIF orientation is reset, file viewers also no longer autorotate the thumbnail, and after autorotation the thumbnail shows up 90 degrees CCW.

Tested this both via my latest version of govips as well as CLI on macOS as well as Ubuntu groovy on libvips 8.10.2.

To Reproduce
Steps to reproduce the behavior:

  1. Use Image input1.jpg
  2. vips copy 'input1.jpg[autorotate]' cli_output.jpg
  3. View image thumbnail or do exiftool -b -ThumbnailImage cli_output.jpg > thumb.jpg

thumb.jpg attached as sample.

input1

cli_output

thumb

P.S. I love libvips, thanks for the great work. I did a simple backporting of libvips 8.10.2 from Groovy to the two latest LTS Ubuntu versions 20.04 focal as well as 18.04 bionic into my PPA, might be useful for other people as well: https://launchpad.net/~tonimelisma/+archive/ubuntu/ppa

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions