fix test suite
This commit is contained in:
parent
4c51f5b36d
commit
f32ab06a1c
4
TODO
4
TODO
@ -3,6 +3,10 @@
|
||||
yes, what about the case where float mask sums to zero, we'll /0 when scaling
|
||||
the output mask
|
||||
|
||||
not sure the fix is right, think again
|
||||
|
||||
maybe look at change in sum? add difference to scale?
|
||||
|
||||
- looks like we have a race in tiled threadcache? see
|
||||
|
||||
https://github.com/jcupitt/libvips/issues/347
|
||||
|
@ -233,11 +233,14 @@ im_vips2imask( IMAGE *in, const char *filename )
|
||||
int_ratio += out->coeff[x + width * y];
|
||||
int_ratio /= out->scale;
|
||||
|
||||
/* And adjust the scale to get as close to a match as we can.
|
||||
/* And adjust the scale to get as close to a match as we can. This
|
||||
* won't work for masks which sum to zero, obviously :-(
|
||||
*/
|
||||
out->scale = VIPS_RINT( out->scale * int_ratio / double_ratio );
|
||||
if( out->scale == 0 ) {
|
||||
out->scale = 1;
|
||||
if( double_ratio != 0.0 ) {
|
||||
out->scale = VIPS_RINT( out->scale * int_ratio / double_ratio );
|
||||
if( out->scale == 0 ) {
|
||||
out->scale = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* We should probably do the same for offset, somehow.
|
||||
|
Loading…
Reference in New Issue
Block a user