mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Prevent auto-rotate fail for libmagick formats #117
This commit is contained in:
@@ -657,7 +657,10 @@ class ResizeWorker : public NanAsyncWorker {
|
||||
bool flip = FALSE;
|
||||
if (angle == -1) {
|
||||
const char *exif;
|
||||
if (!vips_image_get_string(input, "exif-ifd0-Orientation", &exif)) {
|
||||
if (
|
||||
vips_image_get_typeof(input, "exif-ifd0-Orientation") != 0 &&
|
||||
!vips_image_get_string(input, "exif-ifd0-Orientation", &exif)
|
||||
) {
|
||||
if (exif[0] == 0x36) { // "6"
|
||||
rotate = ANGLE_90;
|
||||
} else if (exif[0] == 0x33) { // "3"
|
||||
|
||||
Reference in New Issue
Block a user