Imagick::getImageProperties

Description

Returns all associated properties that match the pattern. If TRUE is passed as second parameter
only the property names are returned. This method is available if Imagick has been compiled against ImageMagick version 6.3.6 or newer.

Parameters

pattern

The pattern for property names.

only_names

Whether to return only property names. If FALSE then also the values are returned

The getImageProperties function in PHP returns an array of property keys available for an image. To get these property values, you use getImageProperty function, giving it one of the available keys provided by the getImageProperties function result. For some images, you may have a lot of properties and for some, you may have few. The two that almost every image seems to have are "date:create" and "date:modify", but some images may have forty or more properties, some titled "exif:Compression", "photoshop:Credit", "jpeg:colorspace", "rdf:Alt", "stRef:documentID", and "xap:CreatorTool." PNG files will also have properties like "png:IHDR.bit_depth" and "png:IHDR.width,height." So far, it appears generally that GIF and BMP files, being simpler, have fewer properties, whereas JPEG and PNG files, being more complicated, have much wider array of properties. It seems incredibly useful in document management.