Closed uasan closed 7 years ago
You need to put in the ifd as well, for example exif-ifd2-MakerNote
.
You can list all the fields on an image with:
$ vipsheader -a IMG_4618.jpg
IMG_4618.jpg: 1024x768 uchar, 3 bands, srgb, jpegload
width: 1024
height: 768
bands: 3
format: uchar
coding: none
interpretation: srgb
xoffset: 0
yoffset: 0
xres: 7.08661
yres: 7.08661
filename: IMG_4618.jpg
vips-loader: jpegload
jpeg-multiscan: 0
exif-data: 6626 bytes of binary data
icc-profile-data: 1352 bytes of binary data
resolution-unit: in
exif-ifd0-ImageDescription: ( , ASCII, 32 components, 32 bytes)
exif-ifd0-Make: Canon (Canon, ASCII, 6 components, 6 bytes)
exif-ifd0-Model: Canon PowerShot S90 (Canon PowerShot S90, ASCII, 20 components, 20 bytes)
exif-ifd0-Orientation: 1 (Top-left, Short, 1 components, 2 bytes)
exif-ifd0-XResolution: 11796480/65536 (180.00000, Rational, 1 components, 8 bytes)
exif-ifd0-YResolution: 11796480/65536 (180.00000, Rational, 1 components, 8 bytes)
etc. etc.
I would use php-vips
rather than the binary module, I guess you know.
Did you see php-vips?
https://github.com/jcupitt/php-vips
It's a fairly high-level php binding over this low-level binary module. API docs here:
https://jcupitt.github.io/php-vips/docs/classes/Jcupitt.Vips.Image.html
Thanks It works!
Did you see php-vips?
Yes, i saw, but I'm doing a low-level PHP worker, which should work async. Thank.
How to get EXIF value by field name? Thank.