mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-14 09:55:56 -07:00
fix(vips): panic error on exif orientation
This commit is contained in:
parent
4bf5d7391e
commit
6142436743
3 changed files with 13 additions and 6 deletions
6
vips.h
6
vips.h
|
|
@ -68,12 +68,12 @@ vips_rotate(VipsImage *in, VipsImage **buf, int angle)
|
|||
int
|
||||
vips_exif_orientation(VipsImage *image) {
|
||||
int orientation = 0;
|
||||
const char **exif;
|
||||
const char *exif;
|
||||
if (
|
||||
vips_image_get_typeof(image, "exif-ifd0-Orientation") != 0 &&
|
||||
!vips_image_get_string(image, "exif-ifd0-Orientation", exif)
|
||||
!vips_image_get_string(image, "exif-ifd0-Orientation", &exif)
|
||||
) {
|
||||
orientation = atoi(exif[0]);
|
||||
orientation = atoi(&exif[0]);
|
||||
}
|
||||
return orientation;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue