• R/O
  • HTTP
  • SSH
  • HTTPS

Zusammenfassung des Repository

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

D bindings to the GraphicsMagick library.


Neueste Commits RSS

Rev. Zeit Autor Nachricht
9f6c2f2 2023-01-29 08:49:23 kaerou master Fix error in README example
8f77b94 2023-01-14 18:40:44 kaerou Update documentation Should be all up-to-date?
d331323 2023-01-14 16:34:54 kaerou Add a "convert" example. Again, the issue with GC freein...
f029492 2023-01-14 16:23:34 kaerou Update examples for new magickd code. There are some iss...
473cacd 2023-01-14 16:15:24 kaerou Update public imports for magickd/package.d No longer im...
3eb6774 2023-01-14 15:46:26 kaerou Start work on new magickd Since I've now separated magic...
a27363b 2023-01-14 15:22:05 kaerou Clean up dub.sdl files magickd/dub.sdl: * Removed the ...
8378f38 2023-01-12 16:44:01 kaerou Begin conversion of graphicsmagick_c I'll be changing ho...
e6d16b9 2022-11-05 09:06:55 kaerou Deprecate magickd.core.common The module will serve no p...
800d801 2022-11-05 08:23:42 kaerou Fix magickd examples build script Incorrectly importing ...

Zweige

Name Rev. Zeit Autor Nachricht
master 9f6c2f2 2023-01-29 08:49:23 kaerou Fix error in README example

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.

magickd supports D version 2.076 and higher.

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://repo.or.cz/magickd.git" \
    version="d331323932b3833aaff5cab0762c7099e3b36555"

For dub.json:

"dependencies": {
    "magickd": {
        "repository": "git+https://repo.or.cz/magickd.git",
        "version": "d331323932b3833aaff5cab0762c7099e3b36555"
    }
}

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.

Dynamic bindings

By default, magickd will build a version that uses dynamic bindings. This requires loading the library at runtime and binding the symbols.

import magickd;

/* Attempt to load the GraphicsMagick library. */
void *libgm = null;

bool success = loadGraphicsMagick(libgm);
if (false == success) {
    /*
     * We failed to load for some reason (errors are printed to stderr)
     */
    if (null is libgm) {
        /*
         * We failed to find the shared library, perhaps GraphicsMagick
         * is not installed.
         */
    } else {
        /*
         * We just had some issues linking some of the dynamic functions,
         * so proceed with caution. Again, any issues are printed to 
         * stderr.
         */
    }
} else {
    /*
     * We loaded the library without any issues!
     */
}

NOTE: If you aren't using dub, make sure to specify the GMagick_Dynamic version when compiling.

Static bindings

For dub.sdl:

dependency "magickd" repository="git+https://repo.or.cz/magickd.git" \
    version="d331323932b3833aaff5cab0762c7099e3b36555"
versions "GMagick_Static"
libs "GraphicsMagick" "GraphicsMagickWand"

For dub.json:

"dependencies": {
    "magickd": {
        "repository": "git+https://repo.or.cz/magickd.git",
        "version": "d331323932b3833aaff5cab0762c7099e3b36555"
    }
},
"versions": ["GMagick_Static"],
"libs": ["GraphicsMagick", "GraphicsMagickWand"]

Versioning

Each git tag will have a split in the version. The first part will be the version of MagickD; the second part will be the version of GraphicsMagick that it supports. Primary support will be for the most recent version of GraphicsMagick, but I'm happy to support other versions if people need.

The general format is:

vX.Y.Z+A.B.C

X = Major version for MagickD (API breaking) Y = Minor version for MagickD (API addition) Z = Patch version (fixes that don't change API)

A = Major version for GraphicsMagick B = Minor version for GraphicsMagick C = Revision version for GraphicsMagick

License

magickd is licensed under the Expat license, you should have received a copy in a file named LICENSE. If not, see https://repo.or.cz/magickd.git/blob/HEAD:/LICENSE.