Platforms to show: All Mac Windows Linux Cross-Platform
/GraphicsMagick/ImageMagick/LoadTest
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/ImageMagick/LoadTest
This example is the version from Sun, 17th Mar 2012.
Project "LoadTest.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
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action()
// we go into the right folder, so ImageMagick finds it's DLLs.
dim folder as FolderItem = SpecialFolder.Applications.Child("ImageMagick-6.7.2-Q8")
if folder.Exists = false then
MsgBox "Please change path to ImageMagick folder."
break
Return
end if
if not ImageMagickQ8MBS.SetCurrentDirectory(folder) then
MsgBox "Failed to change working directory."
break
Return
end if
if ImageMagickQ8MBS.LoadLibrary("CORE_RL_magick_.dll") then
List.AddRow ImageMagickQ8MBS.Version
List.AddRow ImageMagickQ8MBS.ReleaseDate
List.AddRow ImageMagickQ8MBS.Copyright
List.AddRow ImageMagickQ8MBS.Features
List.AddRow ImageMagickQ8MBS.HomeURL
List.AddRow ImageMagickQ8MBS.PackageName
List.AddRow ImageMagickQ8MBS.QuantumDepth
else
MsgBox "Failed to load the library."+EndOfLine+EndOfLine+ImageMagickQ8MBS.LoadErrorString
end if
exception n as UnsupportedFormatException
MsgBox "Exception: "+n.message
End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action()
// we go into the right folder, so ImageMagick finds it's DLLs.
dim folder as FolderItem = SpecialFolder.Applications.Child("ImageMagick-6.7.2-Q16")
if folder.Exists = false then
MsgBox "Please change path to ImageMagick folder in code."
break
Return
end if
if not ImageMagickQ16MBS.SetCurrentDirectory(folder) then
MsgBox "Failed to change working directory."
break
Return
end if
if ImageMagickQ16MBS.LoadLibrary("CORE_RL_magick_.dll") then
List.AddRow ImageMagickQ16MBS.Version
List.AddRow ImageMagickQ16MBS.ReleaseDate
List.AddRow ImageMagickQ16MBS.Copyright
List.AddRow ImageMagickQ16MBS.Features
List.AddRow ImageMagickQ16MBS.HomeURL
List.AddRow ImageMagickQ16MBS.PackageName
List.AddRow ImageMagickQ16MBS.QuantumDepth
else
MsgBox "Failed to load the library."+EndOfLine+EndOfLine+ImageMagickQ16MBS.LoadErrorString
end if
exception n as UnsupportedFormatException
MsgBox "Exception: "+n.message
End EventHandler
End Control
EventHandler Sub Open()
if not TargetWin32 then
MsgBox "This example is for Windows only."
end if
End EventHandler
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
The items on this page are in the following plugins: MBS GraphicsMagick Plugin.