Open
Description
Reading image metadata is inconvenient because the return format looks like a result of inspect
call:
image = Vips::Image.new_from_file('file.png')
image.get "exif-ifd3-GPSTimeStamp"
# => "13/1 57/1 0/1 (13:57:00.00, Rational, 3 components, 24 bytes)"
image.get "width" # => 3024
image.get "exif-ifd3-UserComment"
# => "Hello (world) (Hello (world), ASCII, 14 components, 14 bytes)"
It can be especially difficult to parse as I can not simply ignore what is in parens all the time because they are not always there, or can be part of the output of text fields.
Is it possible to introduce a different method that would return result in a more structured way like?
image.field("exif-ifd3-UserComment")
# => {type: :string, value: "Hello (world)", encoding: :ASCII, components: 14, bytes: 14}
Metadata
Metadata
Assignees
Labels
No labels