mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-07 21:48:13 -08:00
refactor(vips): define constant
This commit is contained in:
parent
b7eaa00f10
commit
c22442428c
1 changed files with 4 additions and 2 deletions
6
vips.h
6
vips.h
|
|
@ -22,6 +22,8 @@
|
|||
#define VIPS_ANGLE_D270 VIPS_ANGLE_270
|
||||
#endif
|
||||
|
||||
#define EXIF_IFD0_ORIENTATION "exif-ifd0-Orientation"
|
||||
|
||||
enum types {
|
||||
UNKNOWN = 0,
|
||||
JPEG,
|
||||
|
|
@ -135,8 +137,8 @@ vips_exif_orientation(VipsImage *image) {
|
|||
int orientation = 0;
|
||||
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_typeof(image, EXIF_IFD0_ORIENTATION) != 0 &&
|
||||
!vips_image_get_string(image, EXIF_IFD0_ORIENTATION, &exif)
|
||||
) {
|
||||
orientation = atoi(&exif[0]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue