diff --git a/libvips/foreign/magick2vips.c b/libvips/foreign/magick2vips.c index 0f138475..c9518ed2 100644 --- a/libvips/foreign/magick2vips.c +++ b/libvips/foreign/magick2vips.c @@ -109,6 +109,7 @@ #include #include "pforeign.h" +#include "magick.h" /* pre-float Magick used to call this MaxRGB. */ diff --git a/libvips/histogram/hist_plot.c b/libvips/histogram/hist_plot.c index c7349e6b..2022accc 100644 --- a/libvips/histogram/hist_plot.c +++ b/libvips/histogram/hist_plot.c @@ -205,11 +205,12 @@ vips_hist_plot_build( VipsObject *object ) vips_check_hist( class->nickname, in ) ) return( -1 ); - if( vips_band_format_isint( in->BandFmt ) ) { + if( !vips_band_format_isuint( in->BandFmt ) && + vips_band_format_isint( in->BandFmt ) ) { + /* A signed int type. Move min up to 0. + */ double min; - /* Move min up to 0. - */ if( vips_min( in, &min, NULL ) || vips_linear1( in, &t[0], 1.0, -min, NULL ) ) return( -1 );