fixes to lcms2 support
This commit is contained in:
parent
40604e776a
commit
1e121f2da7
7
TODO
7
TODO
@ -1,8 +1,3 @@
|
||||
- get rid of no-threads mode, glib no longer supports this
|
||||
|
||||
- argh g_mutex_new() is now deprecated, make our own vips_mutex_new()
|
||||
compatibility function that uses g_mutex_init() internally, if available
|
||||
|
||||
- add mono as a colourspace? also rad?
|
||||
|
||||
- something to test if an image is in a supported colourspace?
|
||||
@ -18,7 +13,7 @@
|
||||
|
||||
- im_icc_ac2rc needs doing once we have a general 'convert' operator
|
||||
|
||||
- test new icc stuff with lcms1
|
||||
- test new icc stuff with lcms1 and lcms2
|
||||
|
||||
- should we have a better thing to stop convert_saveable running for vips
|
||||
images?
|
||||
|
@ -450,6 +450,9 @@ if test x"$with_lcms" != "xno"; then
|
||||
PKG_CHECK_MODULES(LCMS, lcms2,
|
||||
[AC_DEFINE(HAVE_LCMS2,1,[define if you have lcms2 installed.])
|
||||
with_lcms="yes (lcms2)"
|
||||
echo seen LCMS_CFLAGS=$LCMS_CFLAGS
|
||||
echo seen LCMS_INCLUDES=$LCMS_INCLUDES
|
||||
echo seen LCMS_LIBS=$LCMS_LIBS
|
||||
PACKAGES_USED="$PACKAGES_USED lcms2"],
|
||||
[PKG_CHECK_MODULES(LCMS, lcms,
|
||||
[AC_DEFINE(HAVE_LCMS,1,[define if you have lcms installed.])
|
||||
@ -664,13 +667,13 @@ fi
|
||||
# Gather all up for VIPS_CFLAGS, VIPS_INCLUDES, VIPS_LIBS and VIPS_CXX_LIBS
|
||||
# sort includes to get longer, more specific dirs first
|
||||
# helps, for example, selecting graphicsmagick over imagemagick
|
||||
VIPS_CFLAGS=`for i in $VIPS_CFLAGS $GTHREAD_CFLAGS $REQUIRED_CFLAGS $PANGOFT2_CFLAGS $FFTW_CFLAGS $MAGICK_CFLAGS $PNG_CFLAGS $EXIF_CFLAGS $MATIO_CFLAGS $CFITSIO_CFLAGS $OPENEXR_CFLAGS $OPENSLIDE_CFLAGS $ORC_CFLAGS $TIFF_CFLAGS
|
||||
VIPS_CFLAGS=`for i in $VIPS_CFLAGS $GTHREAD_CFLAGS $REQUIRED_CFLAGS $PANGOFT2_CFLAGS $FFTW_CFLAGS $MAGICK_CFLAGS $PNG_CFLAGS $EXIF_CFLAGS $MATIO_CFLAGS $CFITSIO_CFLAGS $OPENEXR_CFLAGS $OPENSLIDE_CFLAGS $ORC_CFLAGS $TIFF_CFLAGS $LCMS_CFLAGS
|
||||
do
|
||||
echo $i
|
||||
done | sort -ru`
|
||||
VIPS_CFLAGS=`echo $VIPS_CFLAGS`
|
||||
VIPS_CFLAGS="$VIPS_DEBUG_FLAGS $VIPS_CFLAGS"
|
||||
VIPS_INCLUDES="$PNG_INCLUDES $TIFF_INCLUDES $ZIP_INCLUDES $JPEG_INCLUDES $FFTW_INCLUDES $LCMS_INCLUDES"
|
||||
VIPS_INCLUDES="$PNG_INCLUDES $TIFF_INCLUDES $ZIP_INCLUDES $JPEG_INCLUDES"
|
||||
VIPS_LIBS="$MAGICK_LIBS $PNG_LIBS $TIFF_LIBS $ZIP_LIBS $JPEG_LIBS $GTHREAD_LIBS $REQUIRED_LIBS $PANGOFT2_LIBS $FFTW_LIBS $ORC_LIBS $LCMS_LIBS $OPENEXR_LIBS $OPENSLIDE_LIBS $CFITSIO_LIBS $MATIO_LIBS $EXIF_LIBS -lm"
|
||||
|
||||
# we need this to generate paths in swig/python/setup.py.in
|
||||
|
@ -528,6 +528,14 @@ vips_colour_convert_build( VipsObject *object )
|
||||
build( object ) )
|
||||
return( -1 );
|
||||
|
||||
/* No conversion necessary.
|
||||
*/
|
||||
if( convert->in->Type == convert->space ) {
|
||||
g_object_set( convert, "out", vips_image_new(), NULL );
|
||||
|
||||
return( vips_image_write( convert->in, convert->out ) );
|
||||
}
|
||||
|
||||
x = convert->in;
|
||||
|
||||
for( i = 0; i < VIPS_NUMBER( vips_colour_routes ); i++ )
|
||||
|
@ -64,8 +64,13 @@
|
||||
*/
|
||||
#ifdef HAVE_LCMS2
|
||||
#include <lcms2.h>
|
||||
|
||||
/* This is slightly different in lcms2.
|
||||
*/
|
||||
#define SIG_LAB ((cmsColorSpaceSignature) icSigLabData)
|
||||
#else /*HAVE_LCMS*/
|
||||
#include <lcms.h>
|
||||
#define SIG_LAB icSigLabData
|
||||
#endif
|
||||
|
||||
#include <icc34.h>
|
||||
@ -266,8 +271,8 @@ vips_icc_build( VipsObject *object )
|
||||
*/
|
||||
if( icc->in_profile &&
|
||||
icc->out_profile &&
|
||||
cmsGetColorSpace( icc->in_profile ) == icSigLabData &&
|
||||
cmsGetColorSpace( icc->out_profile ) == icSigLabData ) {
|
||||
cmsGetColorSpace( icc->in_profile ) == SIG_LAB &&
|
||||
cmsGetColorSpace( icc->out_profile ) == SIG_LAB ) {
|
||||
vips_error( class->nickname,
|
||||
"%s", _( "no device profile" ) );
|
||||
return( -1 );
|
||||
|
@ -1018,7 +1018,6 @@ main( int argc, char **argv )
|
||||
G_LOG_LEVEL_ERROR |
|
||||
G_LOG_LEVEL_CRITICAL |
|
||||
G_LOG_LEVEL_WARNING );
|
||||
fprintf( stderr, "** DEBUG_FATAL\n" );
|
||||
#endif /*!DEBUG_FATAL*/
|
||||
|
||||
/* Try to find our action.
|
||||
|
Loading…
Reference in New Issue
Block a user