Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  

GMImage.GetAttribute

Query a named attribute.

Component: GraphicsMagick
Version: 2.0
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "GMImage.GetAttribute"; ImageRef; name )

Parameters

Parameter Description Example value
ImageRef The image reference (a number returned from the GMImage.New functions) 1
name The name of the attribute.

Result

Returns the value as string.

Description

Query a named attribute.
Any number of named attributes may be attached to the image. For example, the image comment is a named image attribute with the name "comment". EXIF tags are attached to the image as named attributes. Use the syntax "EXIF:<tag>" to request an EXIF tag similar to "EXIF:DateTime":

Examples

Read EXIF DateTime:

MBS( "GMImage.GetAttribute"; $image; "EXIF:DateTime" )

Query IPTC Keywords:

MBS("GMImage.GetAttribute"; $img; "IPTC:2:25"; "UTF-8")

Query JPEG Quality used to compress image:

Set Variable [$img; Value:MBS("GMImage.NewFromContainer"; Image::InputImage)]
Set Variable [$value; Value:MBS("GMImage.GetAttribute"; $img; "JPEG-Quality")]
Show Custom Dialog ["JPEG Quality used to compress …"; $value]
Set Variable [$r; Value:MBS("GMImage.Destroy"; $img)]

See also


GMImage.GetAntiAlias   -   GMImage.GetBackgroundColor

Feedback: Report problem or ask question.




Links
MBS REALbasic Plugins - Bilder aus Nickenich