WRaster: Add optional support to JPEG XL

Detect if libjxl is intalled, and build-in support in raster lib.
Feature can be disabled/enabled at configure time.
This commit is contained in:
David Maciejak authored and Carlos R. Mafra committed 2025-12-27 19:48:37 +00:00
1 parent 67e2f5e1ca
commit 4392fdc291
8 files changed
+297 -3

No files matched your search

+7 -2
View File
@@ -38,12 +38,13 @@ typedef enum {
IM_PPM = 4,
IM_JPEG = 5,
IM_GIF = 6,
IM_WEBP = 7
IM_WEBP = 7,
IM_JXL = 8
} WRImgFormat;
/* How many image types we have. */
/* Increase this when adding new image types! */
#define IM_TYPES 7
#define IM_TYPES 8
/*
* Function for Loading in a specific format
@@ -64,6 +65,10 @@ RImage *RLoadPNG(RContext *context, const char *file);
RImage *RLoadJPEG(const char *file);
#endif
#ifdef USE_JXL
RImage *RLoadJXL(const char *file);
#endif
#ifdef USE_GIF
RImage *RLoadGIF(const char *file, int index);
#endif