mirror of
https://github.com/gryf/wmaker.git
synced 2026-10-09 03:02:30 +02: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:
1 parent
b6ffe90ec4
commit
bb69682b88
10 files changed
+183
-2
No files matched your search
@@ -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