@@ -213,13 +213,69 @@ end
213
213
214
214
formatstring (s:: Stream{DataFormat{S}} ) where {S} = string (S)
215
215
216
+ @doc raw """
217
+ magickinfo(file::Union{AbstractString,IO})
218
+
219
+ Reads an image `file` and returns an array of strings describing the property data in the image file.
220
+
221
+ # Examples
222
+ ```julia-repl
223
+ julia> p = magickinfo("Image.jpeg")
224
+ 63-element Array{String,1}:
225
+ "date:create"
226
+ "date:modify"
227
+ "exif:ApertureValue"
228
+ "exif:BrightnessValue"
229
+ "exif:ColorSpace"
230
+ "exif:ComponentsConfiguration"
231
+ "exif:DateTime"
232
+ "exif:DateTimeDigitized"
233
+ "exif:DateTimeOriginal"
234
+ "exif:ExifImageLength"
235
+ "exif:ExifImageWidth"
236
+ "exif:ExifOffset"
237
+ "exif:ExifVersion"
238
+ ⋮
239
+ "exif:thumbnail:JPEGInterchangeFormat"
240
+ "exif:thumbnail:JPEGInterchangeFormatLength"
241
+ "exif:thumbnail:ResolutionUnit"
242
+ "exif:thumbnail:XResolution"
243
+ "exif:thumbnail:YResolution"
244
+ "exif:WhiteBalance"
245
+ "exif:XResolution"
246
+ "exif:YCbCrPositioning"
247
+ "exif:YResolution"
248
+ "jpeg:colorspace"
249
+ "jpeg:sampling-factor"
250
+ "unknown"a
251
+ ```
252
+ """
216
253
function magickinfo (file:: Union{AbstractString,IO} )
217
254
wand = MagickWand ()
218
255
readimage (wand, file)
219
256
resetiterator (wand)
220
257
getimageproperties (wand, " *" )
221
258
end
222
259
260
+ @doc raw """
261
+ magickinfo(file::Union{AbstractString,IO}, properties::Union{Tuple,AbstractVector})
262
+
263
+ Reads an image `file` and returns a Dict containing the values for the requested `properties`.
264
+
265
+ # Examples
266
+ ```julia-repl
267
+ julia> magickinfo("IMG_6477.jpeg",
268
+ ("exif:DateTime","exif:GPSLatitude","exif:GPSLatitudeRef",
269
+ "exif:GPSLongitude","exif:GPSLongitudeRef","exif:GPSAltitude"))
270
+ Dict{String,Any} with 6 entries:
271
+ "exif:GPSLongitudeRef" => "W"
272
+ "exif:GPSLatitude" => "44/1, 22/1, 2326/100"
273
+ "exif:GPSLatitudeRef" => "N"
274
+ "exif:GPSLongitude" => "71/1, 13/1, 5301/100"
275
+ "exif:DateTime" => "2020:01:22 13:17:41"
276
+ "exif:GPSAltitude" => "261189/757"
277
+ ```
278
+ """
223
279
function magickinfo (file:: Union{AbstractString,IO} , properties:: Union{Tuple,AbstractVector} )
224
280
wand = MagickWand ()
225
281
readimage (wand, file)
0 commit comments