add VIPS_COMBINE_MIN combining mode
for vips_compass()
This commit is contained in:
parent
55e577a2fb
commit
487c112807
@ -33,6 +33,7 @@
|
|||||||
- "--size Nx" to vipsthumbnail was broken, thanks jrochkind
|
- "--size Nx" to vipsthumbnail was broken, thanks jrochkind
|
||||||
- fix build with gcc 7
|
- fix build with gcc 7
|
||||||
- add vips_fill_nearest() ... fill pixels with nearest colour
|
- add vips_fill_nearest() ... fill pixels with nearest colour
|
||||||
|
- add VIPS_COMBINE_MIN, a new combining mode for vips_compass()
|
||||||
|
|
||||||
29/8/17 started 8.5.9
|
29/8/17 started 8.5.9
|
||||||
- make --fail stop jpeg read on any libjpeg warning, thanks @mceachen
|
- make --fail stop jpeg read on any libjpeg warning, thanks @mceachen
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
* 8/5/17
|
* 8/5/17
|
||||||
* - default to float ... int will often lose precision and should not be
|
* - default to float ... int will often lose precision and should not be
|
||||||
* the default
|
* the default
|
||||||
|
* 2/11/17
|
||||||
|
* - add MIN mode
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -116,6 +118,14 @@ vips_compass_build( VipsObject *object )
|
|||||||
x = combine[0];
|
x = combine[0];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VIPS_COMBINE_MIN:
|
||||||
|
if( vips_bandrank( abs, &combine[0], compass->times,
|
||||||
|
"index", 0,
|
||||||
|
NULL ) )
|
||||||
|
return( -1 );
|
||||||
|
x = combine[0];
|
||||||
|
break;
|
||||||
|
|
||||||
case VIPS_COMBINE_SUM:
|
case VIPS_COMBINE_SUM:
|
||||||
if( vips_sum( abs, &combine[0], compass->times, NULL ) )
|
if( vips_sum( abs, &combine[0], compass->times, NULL ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
@ -75,8 +75,9 @@
|
|||||||
* VipsCombine:
|
* VipsCombine:
|
||||||
* @VIPS_COMBINE_MAX: take the maximum of the possible values
|
* @VIPS_COMBINE_MAX: take the maximum of the possible values
|
||||||
* @VIPS_COMBINE_SUM: sum all the values
|
* @VIPS_COMBINE_SUM: sum all the values
|
||||||
|
* @VIPS_COMBINE_MIN: take the minimum value
|
||||||
*
|
*
|
||||||
* How to combine values.
|
* How to combine values. See vips_compass(), for example.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
G_DEFINE_ABSTRACT_TYPE( VipsConvolution, vips_convolution,
|
G_DEFINE_ABSTRACT_TYPE( VipsConvolution, vips_convolution,
|
||||||
|
@ -41,6 +41,7 @@ extern "C" {
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
VIPS_COMBINE_MAX,
|
VIPS_COMBINE_MAX,
|
||||||
VIPS_COMBINE_SUM,
|
VIPS_COMBINE_SUM,
|
||||||
|
VIPS_COMBINE_MIN,
|
||||||
VIPS_COMBINE_LAST
|
VIPS_COMBINE_LAST
|
||||||
} VipsCombine;
|
} VipsCombine;
|
||||||
|
|
||||||
|
@ -836,6 +836,7 @@ vips_combine_get_type( void )
|
|||||||
static const GEnumValue values[] = {
|
static const GEnumValue values[] = {
|
||||||
{VIPS_COMBINE_MAX, "VIPS_COMBINE_MAX", "max"},
|
{VIPS_COMBINE_MAX, "VIPS_COMBINE_MAX", "max"},
|
||||||
{VIPS_COMBINE_SUM, "VIPS_COMBINE_SUM", "sum"},
|
{VIPS_COMBINE_SUM, "VIPS_COMBINE_SUM", "sum"},
|
||||||
|
{VIPS_COMBINE_MIN, "VIPS_COMBINE_MIN", "min"},
|
||||||
{VIPS_COMBINE_LAST, "VIPS_COMBINE_LAST", "last"},
|
{VIPS_COMBINE_LAST, "VIPS_COMBINE_LAST", "last"},
|
||||||
{0, NULL, NULL}
|
{0, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user