stop sdev zero being generated by sharpen
This commit is contained in:
parent
2360d4a6e9
commit
85fe00ac46
@ -101,7 +101,6 @@ G_DEFINE_TYPE( VipsAdd, vips_add, VIPS_TYPE_BINARY );
|
|||||||
static void
|
static void
|
||||||
add_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width )
|
add_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width )
|
||||||
{
|
{
|
||||||
VipsArithmeticClass *class = VIPS_ARITHMETIC_GET_CLASS( arithmetic );
|
|
||||||
VipsImage *im = arithmetic->ready[0];
|
VipsImage *im = arithmetic->ready[0];
|
||||||
|
|
||||||
/* Complex just doubles the size.
|
/* Complex just doubles the size.
|
||||||
@ -113,7 +112,7 @@ add_buffer( VipsArithmetic *arithmetic, VipsPel *out, VipsPel **in, int width )
|
|||||||
int x;
|
int x;
|
||||||
|
|
||||||
/* Add all input types. Keep types here in sync with
|
/* Add all input types. Keep types here in sync with
|
||||||
* bandfmt_add[] below.
|
* vips_add_format_table[] below.
|
||||||
*/
|
*/
|
||||||
switch( vips_image_get_format( im ) ) {
|
switch( vips_image_get_format( im ) ) {
|
||||||
case VIPS_FORMAT_UCHAR:
|
case VIPS_FORMAT_UCHAR:
|
||||||
|
@ -234,7 +234,7 @@ vips_sharpen_build( VipsObject *object )
|
|||||||
/* Stop at 20% of max ... bit mean, but means mask radius is roughly
|
/* Stop at 20% of max ... bit mean, but means mask radius is roughly
|
||||||
* right. We always sharpen a short, so no point using a float mask.
|
* right. We always sharpen a short, so no point using a float mask.
|
||||||
*/
|
*/
|
||||||
if( vips_gaussmat( &t[1], sharpen->radius / 2, 0.2,
|
if( vips_gaussmat( &t[1], 1 + sharpen->radius / 2, 0.2,
|
||||||
"separable", TRUE,
|
"separable", TRUE,
|
||||||
"integer", TRUE,
|
"integer", TRUE,
|
||||||
NULL ) )
|
NULL ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user