diff --git a/ChangeLog b/ChangeLog index d324f9cc..de9c1f2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ master - jp2ksave defaults to chroma subsample off, and jp2 write - don't minimise sink_screen input after expose ... improves caching during interactive use +- require libjxl 0.7+ 24/7/22 started 8.13.1 - fix im7 feature detection in meson diff --git a/libvips/foreign/jxlsave.c b/libvips/foreign/jxlsave.c index 9c49b95d..e3840624 100644 --- a/libvips/foreign/jxlsave.c +++ b/libvips/foreign/jxlsave.c @@ -229,11 +229,7 @@ vips_foreign_save_jxl_build( VipsObject *object ) VipsForeignSaveJxl *jxl = (VipsForeignSaveJxl *) object; VipsImage **t = (VipsImage **) vips_object_local_array( object, 5 ); -#ifdef HAVE_LIBJXL_0_7 JxlEncoderFrameSettings *frame_settings; -#else - JxlEncoderOptions *frame_settings; -#endif JxlEncoderStatus status; VipsImage *in; VipsBandFormat format; @@ -284,9 +280,7 @@ vips_foreign_save_jxl_build( VipsObject *object ) return( -1 ); in = t[0]; -#ifdef HAVE_LIBJXL_JXLENCODERINITBASICINFO JxlEncoderInitBasicInfo( &jxl->info ); -#endif switch( in->BandFmt ) { case VIPS_FORMAT_UCHAR: @@ -419,7 +413,6 @@ vips_foreign_save_jxl_build( VipsObject *object ) if( vips_image_wio_input( in ) ) return( -1 ); -#ifdef HAVE_LIBJXL_0_7 frame_settings = JxlEncoderFrameSettingsCreate( jxl->encoder, NULL ); JxlEncoderFrameSettingsSetOption( frame_settings, JXL_ENC_FRAME_SETTING_DECODING_SPEED, jxl->tier ); @@ -427,13 +420,6 @@ vips_foreign_save_jxl_build( VipsObject *object ) JxlEncoderFrameSettingsSetOption( frame_settings, JXL_ENC_FRAME_SETTING_EFFORT, jxl->effort ); JxlEncoderSetFrameLossless( frame_settings, jxl->lossless ); -#else - frame_settings = JxlEncoderOptionsCreate( jxl->encoder, NULL ); - JxlEncoderOptionsSetDecodingSpeed( frame_settings, jxl->tier ); - JxlEncoderOptionsSetDistance( frame_settings, jxl->distance ); - JxlEncoderOptionsSetEffort( frame_settings, jxl->effort ); - JxlEncoderOptionsSetLossless( frame_settings, jxl->lossless ); -#endif #ifdef DEBUG vips_foreign_save_jxl_print_info( &jxl->info ); diff --git a/meson.build b/meson.build index 5a9f0bc6..2cb70e6d 100644 --- a/meson.build +++ b/meson.build @@ -468,8 +468,8 @@ if libheif_dep.found() endif endif -libjxl_dep = dependency('libjxl', version: '>=0.5', required: get_option('jpeg-xl')) -libjxl_threads_dep = dependency('libjxl_threads', version: '>=0.5', required: get_option('jpeg-xl')) +libjxl_dep = dependency('libjxl', version: '>=0.7', required: get_option('jpeg-xl')) +libjxl_threads_dep = dependency('libjxl_threads', version: '>=0.7', required: get_option('jpeg-xl')) libjxl_found = libjxl_dep.found() and libjxl_threads_dep.found() libjxl_module = false if libjxl_found @@ -481,12 +481,6 @@ if libjxl_found libvips_deps += libjxl_threads_dep endif cfg_var.set('HAVE_LIBJXL', '1') - if cc.has_function('JxlEncoderInitBasicInfo', prefix: '#include ', dependencies: libjxl_dep) - cfg_var.set('HAVE_LIBJXL_JXLENCODERINITBASICINFO', '1') - endif - if libjxl_dep.version().version_compare('>=0.7') - cfg_var.set('HAVE_LIBJXL_0_7', '1') - endif endif libpoppler_dep = dependency('poppler-glib', version: '>=0.16.0', required: get_option('poppler'))