Skip to content

Image Magick GUI

Saif Ahmed edited this page Nov 20, 2021 · 6 revisions

This is an experimental program, not a replacement for GIMP ;). Essentially Image::Magick is required for many of the back-ends. It also is a useful graphical library that is available for many platforms, hence the usefulness as a demo. But it has well over 100 functions, most of which are rather complicated. It is possible to make a true interface to this but inevitably would be mammoth task, and takes away from the principle focus of GUIDeFATE which is to make the development of GUI application easy. This application does allow the user to enter commands that are executed via eval() so is a security risk. This is just meant to be used as a demo.

How it works

We harvest a table of functions from a helpful website. We take that table and convert it into a part of script used to relate the function name, to a description and a list pf parameters. To ease things we classify the functions into a type (e.g. Colour, distortions etc) . We use the hash to create a menu, and then to generate a Message Box to inform the user what the function does, and then paste the function and parameters list to build up a script (on a text editor like panel) that can be applied to an image that can be loaded and viewed in a graphics panel.

Screenshot

Testing Oilpaint and Swirl functions on a picture of a chameleon. Image::Magick GUI

Code

This is in two files

  1. The application contains the main GUIDeFATE interface and the various functions that load, save display and execute the scripts as well as load and save images. It also genrates the functions and menu items from the resource file which is formatted as a hash.
  2. The resource A data file formatted as a hash content to be loaded by the application