From c3def9336180b6f84dbb56ce5a31bd75bd261f12 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 19 Feb 2014 17:13:12 +0000 Subject: [PATCH] ban size == 0 for max/min --- TODO | 13 ------------- libvips/arithmetic/max.c | 2 +- libvips/arithmetic/min.c | 2 +- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/TODO b/TODO index c67e5121..0dd8a5fe 100644 --- a/TODO +++ b/TODO @@ -67,19 +67,6 @@ -- try: - - $ vips max babe.v --x-array --size 0 - Segmentation fault (core dumped) - -- try: - - im = VIPS::Image.new(ARGV[0]) - mask = im.less(240) - columns, rows = mask.project - - with wtc.jpg, segv if libvips is compiled with -O, OK without - - need to do mosaicing - now vips_linear() has uchar output, can we do something with orc? diff --git a/libvips/arithmetic/max.c b/libvips/arithmetic/max.c index 1ed2ca3b..46b388b8 100644 --- a/libvips/arithmetic/max.c +++ b/libvips/arithmetic/max.c @@ -447,7 +447,7 @@ vips_max_class_init( VipsMaxClass *class ) _( "Number of maximum values to find" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMax, size ), - 0, 1000000, 10 ); + 1, 1000000, 10 ); VIPS_ARG_BOXED( class, "out_array", 6, _( "Output array" ), diff --git a/libvips/arithmetic/min.c b/libvips/arithmetic/min.c index 96969836..5daad851 100644 --- a/libvips/arithmetic/min.c +++ b/libvips/arithmetic/min.c @@ -450,7 +450,7 @@ vips_min_class_init( VipsMinClass *class ) _( "Number of minimum values to find" ), VIPS_ARGUMENT_OPTIONAL_INPUT, G_STRUCT_OFFSET( VipsMin, size ), - 0, 1000000, 10 ); + 1, 1000000, 10 ); VIPS_ARG_BOXED( class, "out_array", 6, _( "Output array" ),