From a5e99b15df427692c24047b4568711e7c1e4c3b6 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 30 Apr 2021 11:40:04 +0100 Subject: [PATCH] fix build without openjpeg we had some dangling references --- libvips/foreign/jp2kload.c | 9 +++++---- libvips/foreign/jp2ksave.c | 13 +++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/libvips/foreign/jp2kload.c b/libvips/foreign/jp2kload.c index d6fb775d..0d5abfce 100644 --- a/libvips/foreign/jp2kload.c +++ b/libvips/foreign/jp2kload.c @@ -1258,11 +1258,12 @@ vips__foreign_load_jp2k_decompress( VipsImage *out, #else /*!HAVE_LIBOPENJP2*/ int -vips__foreign_load_jp2k_decompress_buffer( void *data, size_t length, - int width, int height, - void *dest, size_t dest_length ) +vips__foreign_load_jp2k_decompress( VipsImage *out, + int width, int height, gboolean ycc_to_rgb, + void *from, size_t from_length, + void *to, size_t to_length ) { - vips_error( "tiff2vips", + vips_error( "jp2k", "%s", _( "libvips built without JPEG2000 support" ) ); return( -1 ); } diff --git a/libvips/foreign/jp2ksave.c b/libvips/foreign/jp2ksave.c index e9474933..eef96745 100644 --- a/libvips/foreign/jp2ksave.c +++ b/libvips/foreign/jp2ksave.c @@ -1390,6 +1390,19 @@ vips__foreign_load_jp2k_compress( VipsRegion *region, return( 0 ); } +#else /*!HAVE_LIBOPENJP2*/ + +int +vips__foreign_load_jp2k_compress( VipsRegion *region, + VipsRect *tile, VipsTarget *target, + int tile_width, int tile_height, + gboolean save_as_ycc, gboolean subsample, gboolean lossless, int Q ) +{ + vips_error( "jp2k", + "%s", _( "libvips built without JPEG2000 support" ) ); + return( -1 ); +} + #endif /*HAVE_LIBOPENJP2*/ /**