1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00
Commit Graph

9 Commits

Author SHA1 Message Date
Christophe CURIS
19202fd2db WRaster: Create header for i18n helper functions
This patch is just adding a single header, but because it also modifies
all the C files to add the #include, it was made as a patch on its own to
ease review.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2021-05-18 17:49:17 +01:00
Doug Torrance
3022edd060 wrlib: Fix typo in macro containing ImageMagick version
It's USE_MAGICK, not USE_MAGIC.  Also, we wrap the if/else statement
in an ifdef.  This doesn't really affect anything since load_magick.c
won't be compiled if USE_MAGICK is undefined because of an if statement
in the Makefile.  But in the off chance that it is somehow, then we will
try to load a nonexistent version 6 header file since USE_MAGICK will
be interprested as 0 and 0 < 7 is true.
2020-04-19 07:58:28 +01:00
Doug Torrance
dfa92906c0 wrlib: Compile with either ImageMagick 6 and 7
We dropped ImageMagick 6 support in 0.95.9.  However, ImageMagick 6 is
still widespread (e.g., ImageMagick 7 has not been packaged in Debian
yet), and upstream plans on maintaining it until at least 2028 [1].

In this patch, we detect the version of the MagickWand library installed
on the user's system and include the appropriate header file when
building wrlib.

Note: I've only tested this with ImageMagick 6, so I'd appreciate
confirmation that it works with ImageMagick 7.

[1] https://github.com/ImageMagick/ImageMagick6/blob/master/NEWS.txt
2020-04-18 19:49:25 +01:00
Stig-Ørjan Smelror
1dace5699f Drop support for Imagemagick version < 7
Had to do a few modifications to get WM to build with Imagemagick 7.

Attached is the diff from the latest git checkout.

Cheers,
Stig
2019-02-12 19:14:01 +00:00
Christophe CURIS
ad07a97788 wrlib: remove unnecessary variable assignation (Coverity #50258)
As pointed by Coverity, this value is never used, the assignation has no
effect, so Coverity reports that it is unnecessary complexity that is not
compatible with code maintainability.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-06-15 19:45:20 +01:00
Christophe CURIS
f1a36b4c07 wrlib: do not initialize/release ImageMagick unnecessarily
Instead of calling 'MagickWandGenesis' every time an image is loaded, only
call it the first time, and similarly do not call 'MagickWandTerminus' if
the library has not been used before.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-08 20:14:22 +01:00
Christophe CURIS
ebe7673bf6 wrlib: moved 'RShutdown' from 'load.c' to 'misc.c' for consistency
The cleanup function is actually not specific to loading images and could
do a lot more, so it is probably better placed in 'misc.c'
2014-05-08 20:14:22 +01:00
Christophe CURIS
9a0c3ab737 wrlib: light changes to the code for ImageMagick
- changed header used for MagickWand to the one specified in the online
documentation

- changed a comparison to 'MagickTrue' because its value does not allow a
compiler optimisation that would be expected in present case

- fixed potential crash, if loading with Magick fails it could return a
pointer to a de-allocated area

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2014-05-08 20:14:21 +01:00
David Maciejak
bb69682b88 wrlib: added support for imagemagick third-party lib
It uses to provide some missing common image format
like SVG, BMP, PICT, ...
2014-04-29 10:15:27 +01:00