1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 12:00:31 +01:00

wrlib: added support for imagemagick third-party lib

It uses to provide some missing common image format
like SVG, BMP, PICT, ...
This commit is contained in:
David Maciejak
2014-03-08 11:02:08 +08:00
committed by Carlos R. Mafra
parent b6ffe90ec4
commit bb69682b88
10 changed files with 183 additions and 2 deletions

View File

@@ -103,6 +103,13 @@ char **RSupportedFileFormats(void)
return tmp;
}
/* cleaning third-party libs at shutdown */
void RShutdown() {
#ifdef USE_MAGICK
MagickWandTerminus();
#endif
}
static void init_cache(void)
{
char *tmp;
@@ -165,8 +172,16 @@ RImage *RLoadImage(RContext * context, const char *file, int index)
return NULL;
case IM_UNKNOWN:
#ifdef USE_MAGICK
/* generic file format support using ImageMagick
* BMP, PCX, PICT, SVG, ...
*/
image = RLoadMagick(file);
break;
#else
RErrorCode = RERR_BADFORMAT;
return NULL;
#endif
case IM_XPM:
image = RLoadXPM(context, file);