D bindings to the GraphicsMagick library.
Rev. | Zeit | Autor | Nachricht RSS |
9f6c2f29 | 2023-01-29 08:49:23 | kaerou | Fix error in README example |
8f77b944 | 2023-01-14 18:40:44 | kaerou | Update documentation Should be all up-to-date? |
d3313239 | 2023-01-14 16:34:54 | kaerou | Add a "convert" example. Again, the issue with GC freein... |
f029492f | 2023-01-14 16:23:34 | kaerou | Update examples for new magickd code. There are some iss... |
473cacd1 | 2023-01-14 16:15:24 | kaerou | Update public imports for magickd/package.d No longer im... |
3eb67745 | 2023-01-14 15:46:26 | kaerou | Start work on new magickd Since I've now separated magic... |
a27363b6 | 2023-01-14 15:22:05 | kaerou | Clean up dub.sdl files magickd/dub.sdl: * Removed the ... |
8378f382 | 2023-01-12 16:44:01 | kaerou | Begin conversion of graphicsmagick_c I'll be changing ho... |
e6d16b98 | 2022-11-05 09:06:55 | kaerou | Deprecate magickd.core.common The module will serve no p... |
800d8016 | 2022-11-05 08:23:42 | kaerou | Fix magickd examples build script Incorrectly importing ... |
The magickd
package provides a safe higher-level wrapper for the
GraphicsMagick
library. For more information about GraphicsMagick
,
see the official website.
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.
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.
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.
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"]
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
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.
Titel | Priorität | Meilenstein | Tags | Erstellt um | Letztes Update |
MagickD API | Hoch | v1.0.0+1.3.0 | 2023-01-15 08:52:30 | 2023-01-15 08:52:30 |
Welcome to OSDN Wiki system. Here is your chamber Wiki space.
Check Wiki Guide (English) to refer syntax and functions.
[PageInfo]
(auto generated page)
[Permissions]
view:all, edit:admins, delete/config:admins