forked from enlightenment/efl
Evas: add jxl loader and saver
add jxl loader and saver to Evas. Entice for loading, animated jxl files or not some conformances files : https://github.com/libjxl/conformance/tree/master/testcases
This commit is contained in:
parent
d4ee3a158a
commit
01fb3233eb
|
@ -195,8 +195,8 @@ option('unmount-path',
|
|||
option('evas-loaders-disabler',
|
||||
type : 'array',
|
||||
description : 'List of modular image/vector loaders to disable in efl',
|
||||
choices : ['', 'gst', 'pdf', 'ps', 'raw', 'svg', 'rsvg', 'xcf', 'bmp', 'dds', 'eet', 'generic', 'gif', 'ico', 'jp2k', 'jpeg', 'pmaps', 'png', 'psd', 'tga', 'tgv', 'tiff', 'wbmp', 'webp', 'xpm', 'json', 'avif', 'heif'],
|
||||
value : ['json', 'avif', 'heif']
|
||||
choices : ['', 'gst', 'pdf', 'ps', 'raw', 'svg', 'rsvg', 'xcf', 'bmp', 'dds', 'eet', 'generic', 'gif', 'ico', 'jp2k', 'jpeg', 'pmaps', 'png', 'psd', 'tga', 'tgv', 'tiff', 'wbmp', 'webp', 'xpm', 'json', 'avif', 'heif', 'jxl'],
|
||||
value : ['json', 'avif', 'heif', 'jxl']
|
||||
)
|
||||
|
||||
option('ecore-imf-loaders-disabler',
|
||||
|
|
|
@ -3164,6 +3164,7 @@ src/modules/evas/image_loaders/heif/evas_image_load_heif.c
|
|||
src/modules/evas/image_loaders/ico/evas_image_load_ico.c
|
||||
src/modules/evas/image_loaders/jp2k/evas_image_load_jp2k.c
|
||||
src/modules/evas/image_loaders/jpeg/evas_image_load_jpeg.c
|
||||
src/modules/evas/image_loaders/jxl/evas_image_load_jxl.c
|
||||
src/modules/evas/image_loaders/pmaps/evas_image_load_pmaps.c
|
||||
src/modules/evas/image_loaders/png/evas_image_load_png.c
|
||||
src/modules/evas/image_loaders/psd/evas_image_load_psd.c
|
||||
|
|
|
@ -66,6 +66,8 @@ static const struct ext_loader_s loaders[] =
|
|||
|
||||
MATCHING(".dds", "dds"),
|
||||
|
||||
MATCHING(".jxl", "jxl"),
|
||||
|
||||
MATCHING(".avif", "avif"),
|
||||
MATCHING(".avifs", "avif"),
|
||||
|
||||
|
@ -193,7 +195,7 @@ static const struct ext_loader_s loaders[] =
|
|||
static const char *loaders_name[] =
|
||||
{ /* in order of most likely needed */
|
||||
"png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "webp", "pmaps",
|
||||
"bmp", "tga", "wbmp", "ico", "psd", "jp2k", "dds", "avif", "heif",
|
||||
"bmp", "tga", "wbmp", "ico", "psd", "jp2k", "dds", "jxl", "avif", "heif",
|
||||
"generic"
|
||||
};
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@ evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key
|
|||
saver = "tgv";
|
||||
if (!strcasecmp(p, "avif"))
|
||||
saver = "avif";
|
||||
if (!strcasecmp(p, "jxl"))
|
||||
saver = "jxl";
|
||||
}
|
||||
|
||||
if (saver)
|
||||
|
|
|
@ -206,6 +206,7 @@ EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, heif);
|
|||
EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, ico);
|
||||
EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, jpeg);
|
||||
EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, jp2k);
|
||||
EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, jxl);
|
||||
EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, pmaps);
|
||||
EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, png);
|
||||
EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, psd);
|
||||
|
@ -227,6 +228,7 @@ EVAS_EINA_STATIC_MODULE_DEFINE(vg_saver, svg);
|
|||
EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, avif);
|
||||
EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, eet);
|
||||
EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, jpeg);
|
||||
EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, jxl);
|
||||
EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, png);
|
||||
EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, tiff);
|
||||
EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, webp);
|
||||
|
@ -320,6 +322,9 @@ static const struct {
|
|||
#ifdef EVAS_STATIC_BUILD_JP2K
|
||||
EVAS_EINA_STATIC_MODULE_USE(image_loader, jp2k),
|
||||
#endif
|
||||
#ifdef EVAS_STATIC_BUILD_JXL
|
||||
EVAS_EINA_STATIC_MODULE_USE(image_loader, jxl),
|
||||
#endif
|
||||
#ifdef EVAS_STATIC_BUILD_PMAPS
|
||||
EVAS_EINA_STATIC_MODULE_USE(image_loader, pmaps),
|
||||
#endif
|
||||
|
@ -369,6 +374,9 @@ static const struct {
|
|||
#ifdef EVAS_STATIC_BUILD_JPEG
|
||||
EVAS_EINA_STATIC_MODULE_USE(image_saver, jpeg),
|
||||
#endif
|
||||
#ifdef EVAS_STATIC_BUILD_JXL
|
||||
EVAS_EINA_STATIC_MODULE_USE(image_saver, jxl),
|
||||
#endif
|
||||
#ifdef EVAS_STATIC_BUILD_PNG
|
||||
EVAS_EINA_STATIC_MODULE_USE(image_saver, png),
|
||||
#endif
|
||||
|
|
|
@ -12,6 +12,8 @@ webpdemux = dependency('libwebpdemux', version: ['>=0.5.0'], required: get_optio
|
|||
libopenjp2 = dependency('libopenjp2', required: get_option('evas-loaders-disabler').contains('jp2k') == false)
|
||||
libavif = dependency('libavif', required: get_option('evas-loaders-disabler').contains('avif') == false, version: '>= 0.8.2')
|
||||
heif= dependency('libheif', required: get_option('evas-loaders-disabler').contains('heif') == false)
|
||||
libjxl = dependency('libjxl', required: get_option('evas-loaders-disabler').contains('jxl') == false, version: '>= 0.6.1')
|
||||
libjxl_threads = dependency('libjxl_threads', required: get_option('evas-loaders-disabler').contains('jxl') == false, version: '>= 0.6.1')
|
||||
|
||||
evas_image_loaders_file = [
|
||||
['avif', 'shared', [libavif]],
|
||||
|
@ -23,6 +25,7 @@ evas_image_loaders_file = [
|
|||
['ico', 'shared', []],
|
||||
['jpeg', 'static', [jpeg]],
|
||||
['jp2k', 'shared', [libopenjp2]],
|
||||
['jxl', 'shared', [libjxl, libjxl_threads]],
|
||||
['pmaps', 'shared', []],
|
||||
['png', 'static', [png]],
|
||||
['psd', 'shared', []],
|
||||
|
@ -38,6 +41,7 @@ evas_image_savers_file = [
|
|||
['avif', 'shared', [libavif]],
|
||||
['eet', 'static', [eet]],
|
||||
['jpeg', 'static', [jpeg]],
|
||||
['jxl' , 'shared', [libjxl, libjxl_threads]],
|
||||
['png', 'static', [png]],
|
||||
['tgv', 'shared', [rg_etc, lz4]],
|
||||
['tiff', 'shared', [tiff]],
|
||||
|
|
Loading…
Reference in New Issue