hist_plot fixup

missed a case in the refactor
This commit is contained in:
John Cupitt 2018-05-16 15:26:20 +01:00
parent 7e9efd7a3e
commit e2aafa6ed3
2 changed files with 5 additions and 3 deletions

View File

@ -109,6 +109,7 @@
#include <magick/api.h>
#include "pforeign.h"
#include "magick.h"
/* pre-float Magick used to call this MaxRGB.
*/

View File

@ -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 );