Platforms to show: All Mac Windows Linux Cross-Platform

/GraphicsMagick/GraphicsMagick/GM IPTC


Required plugins for this example: MBS GraphicsMagick Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /GraphicsMagick/GraphicsMagick/GM IPTC

This example is the version from Sun, 3rd Dec 2016.

Project "GM IPTC.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
EventHandler Sub Open() 'dim f as FolderItem = GetOpenFolderItem("") dim f as FolderItem = FindFile("test.jpg") if f = nil then quit dim g as new GMImageMBS(f) Title = f.DisplayName ShowTags g End EventHandler
Sub Constructor() // Calling the overridden superclass constructor. keys = new Dictionary keys.value("5") = "Image Name" keys.value("7") = "Edit Status" keys.value("10") = "Priority" keys.value("15") = "Category" keys.value("20") = "Supplemental Category" keys.value("22") = "Fixture Identifier" keys.value("25") = "Keyword" keys.value("30") = "Release Date" keys.value("35") = "Release Time" keys.value("40") = "Special Instructions" keys.value("45") = "Reference Service" keys.value("47") = "Reference Date" keys.value("50") = "Reference Number" keys.value("55") = "Created Date" keys.value("60") = "Created Time" keys.value("65") = "Originating Program" keys.value("70") = "Program Version" keys.value("75") = "Object Cycle" keys.value("80") = "Byline" keys.value("85") = "Byline Title" keys.value("90") = "City" keys.value("95") = "Province State" keys.value("100") = "Country Code" keys.value("101") = "Country" keys.value("103") = "Original Transmission Reference" keys.value("105") = "Headline" keys.value("110") = "Credit" keys.value("115") = "Source" keys.value("116") = "Copyright String" keys.value("120") = "Caption" keys.value("121") = "Local Caption" keys.value("122") = "Caption Writer" keys.value("200") = "Custom Field 1" keys.value("201") = "Custom Field 2" keys.value("202") = "Custom Field 3" keys.value("203") = "Custom Field 4" keys.value("204") = "Custom Field 5" keys.value("205") = "Custom Field 6" keys.value("206") = "Custom Field 7" keys.value("207") = "Custom Field 8" keys.value("208") = "Custom Field 9" keys.value("209") = "Custom Field 10" keys.value("210") = "Custom Field 11" keys.value("211") = "Custom Field 12" keys.value("212") = "Custom Field 13" keys.value("213") = "Custom Field 14" keys.value("214") = "Custom Field 15" keys.value("215") = "Custom Field 16" keys.value("216") = "Custom Field 17" keys.value("217") = "Custom Field 18" keys.value("218") = "Custom Field 19" keys.value("219") = "Custom Field 20" Super.Constructor End Sub
Function FindFile(name as string) As FolderItem // Look for file in parent folders from executable on dim parent as FolderItem = app.ExecutableFile.Parent while parent<>Nil dim file as FolderItem = parent.Child(name) if file<>Nil and file.Exists then Return file end if parent = parent.Parent wend End Function
Sub ShowTags(g as GMImageMBS) for each key as string in keys.keys dim tag as string = "IPTC:2:"+key dim value as string = g.attributeValue(tag) dim label as string = keys.Value(key) if value <> "" then list.AddRow label, key, value end if next if List.ListCount = 0 then MsgBox "No IPTC in the picture?" end if End Sub
Property keys As Dictionary
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

See also:

The items on this page are in the following plugins: MBS GraphicsMagick Plugin.


The biggest plugin in space...