descriptionD bindings to the GraphicsMagick library
ownerstigma@disroot.org
last changeSun, 23 Jul 2023 04:18:43 +0000 (23 14:18 +1000)
content tags
add:
README.md

MagickD

The magickd package provides a safe higher-level wrapper for the GraphicsMagick library. For more information about GraphicsMagick, see the official website.

Dependencies

In order to use the magickd package, you must have libGraphicsMagick library installed where it can be found by pkg-config.

You will also need a D compiler that supports D 2.076.0.

Configuration

There are multiple ways you can configure the magickd package, but first, add it as a dub dependency:

For dub.sdl:

dependency "magickd" repository="git+https://codeberg.org/supercell/magickd" \
   version="6672d8200e2f1ead1dc4c9169d89a37a827433ac"

For dub.json:

"dependencies": {
   "magickd": {
      "repository": "git+https://codeberg.org/supercell/magickd",
         "version": "6672d8200e2f1ead1dc4c9169d89a37a827433ac"
   }
}

With that done, you're good to go!

NOTE: At some point I'll try get this package on http://dub.pm, for now though, just use the latest git hash. This package won't be on The D package registry so long as they only support GitHub/GitLab/Bitbucket. In the mean time, use the latest git hash.

Dynamic or Static Bindings

By default, magickd will build the "dynamic" version, which will load the GraphicsMagick libraries at runtime and bind the C symbol names to D symbols. This process happens automatically when you import the magickd package. (NOTE: If you're not using dub, then you'll need to specify the GMagick_Dynamic version.)

Alternatively, you can build magickd to use a "static" binding, which requires linking against the GraphicsMagick library when compiling. (NOTE: If you're not using dub, then you'll need to specify the GMagick_Static version.)

macOS - MacPorts - Dynamic Bindings

A quick heads up if you've installed GraphicsMagick via MacPorts, you will need to make sure that the LD_LIBRARY_PATH environment variable will include the directory which holds GraphicsMagick.dylib and GraphicsMagickWand.dylib. By default, the directory is /opt/local/lib. For example:

$ cd examples/
$ ./dmd.sh --shared
$ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/local/lib" \
  ./dmd/ping_dmd /path/to/my/picture.png

License

magickd is licensed under the Expat license, you should have received a copy in a file named LICENSE. If not, see <https://codeberg.org/supercell/magickd/src/branch/master/LICENSE>.

shortlog
2023-07-23 Mio[magickd] Add PixelWand color settersmaster
2023-07-23 Mio[magickd] Update Exception classes
2023-07-23 Mio[magickd] Add PixelWand.quantumColor
2023-07-23 Mio[magickd] Add PixelWand.getColorCount
2023-07-22 Mio[magickd] Add PixelWand.setColor
2023-07-22 Mio[magickd] Add PixelWand getters for quantum colors
2023-07-22 Mio[unittest] Update initialization
2023-07-22 Mio[magickd] PixelWand add getter for all colors
2023-07-22 Mio[examples] Add extract_gif example
2023-07-22 Mio[examples] Update make_gif to produce example GIF
2023-07-22 Mio[magickd] Add MagickWand getPrevious/Next Image
2023-07-22 Mio[magickd] MagickWand#getImageIndex/getNumberImages
2023-07-22 Mio[magickd] Add getImageDispose
2023-07-22 Mio[examples] Add test GIF
2023-07-22 Mio[examples] Consolidate magickd build scripts
2023-07-22 Mio[examples] Update README for make_gif
...
heads
9 months ago master