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:
committed by
Carlos R. Mafra
parent
b6ffe90ec4
commit
bb69682b88
15
wrlib/load.c
15
wrlib/load.c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user