[magickd] Add PixelWand color setters
[magickd.git] / README.md
blob5fd81a432e67c345fc33f3148f3d39c6e0b42c02
2 MagickD
3 =======
5 The `magickd` package provides a safe higher-level wrapper for the
6 `GraphicsMagick` library.  For more information about `GraphicsMagick`, see the
7 [official website].
9 [official website]: http://www.graphicsmagick.org
12 Dependencies
13 ------------
15 In order to use the `magickd` package, you must have `libGraphicsMagick` library
16 installed where it can be found by `pkg-config`.
18 You will also need a D compiler that supports D [2.076.0].
20 [2.076.0]: https://dlang.org/changelog/2.076.0.html
23 Configuration
24 --------------
26 There are multiple ways you can configure the `magickd` package, but first, add
27 it as a dub dependency:
29 For `dub.sdl`:
30 ```sdl
31 dependency "magickd" repository="git+https://codeberg.org/supercell/magickd" \
32    version="6672d8200e2f1ead1dc4c9169d89a37a827433ac"
33 ```
35 For `dub.json`:
36 ```json
37 "dependencies": {
38    "magickd": {
39       "repository": "git+https://codeberg.org/supercell/magickd",
40          "version": "6672d8200e2f1ead1dc4c9169d89a37a827433ac"
41    }
43 ```
45 With that done, you're good to go!
47 **NOTE:** ~~At some point I'll try get this package on http://dub.pm, for now
48 though, just use the latest git hash.~~ This package won't be on The D package
49 registry so long as they only support GitHub/GitLab/Bitbucket. In the mean time,
50 use the latest git hash.
52 ### Dynamic or Static Bindings
54 By default, `magickd` will build the "dynamic" version, which will load the
55 GraphicsMagick libraries at runtime and bind the C symbol names to D symbols.
56 This process happens automatically when you import the `magickd` package.
57 (**NOTE**: If you're not using [dub], then you'll need to specify the
58 `GMagick_Dynamic` version.)
60 Alternatively, you can build `magickd` to use a "static" binding, which requires
61 linking against the GraphicsMagick library when compiling. (**NOTE**: If you're
62 not using [dub], then you'll need to specify the `GMagick_Static` version.)
64 [dub]: https://dub.pm
66 #### macOS - MacPorts - Dynamic Bindings
68 A quick heads up if you've installed GraphicsMagick via [MacPorts], you will
69 need to make sure that the `LD_LIBRARY_PATH` environment variable will include
70 the directory which holds `GraphicsMagick.dylib` and `GraphicsMagickWand.dylib`.
71 By default, the directory is `/opt/local/lib`.  For example:
73 ```sh
74 $ cd examples/
75 $ ./dmd.sh --shared
76 $ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/local/lib" \
77   ./dmd/ping_dmd /path/to/my/picture.png
78 ```
80 [MacPorts]: https://www.macports.org/
82 License
83 -------
85 `magickd` is licensed under the Expat license, you should have received a copy
86 in a file named `LICENSE`.
87 If not, see <https://codeberg.org/supercell/magickd/src/branch/master/LICENSE>.