• R/O
  • HTTP
  • SSH
  • HTTPS

Source Tree

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

D bindings to the GraphicsMagick library.


名称 大小 Rev. 时间 作者 Log Message
examples
graphicsmagick_c
source
unittest
.editorconfig 172 6cc2a75 2023-07-16 14:58:29 Mio [misc] Add .editorconfig
.gitignore 570 86cc55e 2023-07-22 10:15:52 Mio [examples] Consolidate magickd build ...
CONTRIBUTING.md 4.72 k 44b75a0 2023-07-16 15:54:25 Mio [docs] Rewrite CONTRIBUTING.md Now u...
LICENSE 1.05 k 5fae668 2023-06-25 13:12:40 Mio [graphicsmagick] colorspace `in` -> `...
README.md 2.59 k af102f3 2023-07-15 17:58:58 Mio Re-organize README Just moving to be...
dub.sdl 513 be830ec 2023-07-17 20:37:04 Mio [misc] Update dub.sdl real name, yo!
dub.selections.json 41 5fae668 2023-06-25 13:12:40 Mio [graphicsmagick] colorspace `in` -> `...

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.