fix off by 1 error

This commit is contained in:
John Cupitt 2015-11-19 13:25:52 +00:00
parent d27bbd6803
commit 743b21e83e
3 changed files with 8 additions and 5 deletions

View File

@ -11,7 +11,7 @@
- better cache sizing for vips_resize() - better cache sizing for vips_resize()
- sizealike / formatalike / bandsalike elide completely if they can for - sizealike / formatalike / bandsalike elide completely if they can for
a x2 saving in C stack use in many cases a x2 saving in C stack use in many cases
- added vips_mapim() ... resample with an index image - added vips_mapim() ... resample with an index image, plus test
7/5/15 started 8.1.1 7/5/15 started 8.1.1
- oop, vips-8.0 wrapper script should be vips-8.1, thanks Danilo - oop, vips-8.0 wrapper script should be vips-8.1, thanks Danilo

6
TODO
View File

@ -1,7 +1,9 @@
- black lines in to_polar ... investigate
- easy to get a segv with Nicolas's interpolators, argh - easy to get a segv with Nicolas's interpolators, argh
just with float images?
try to_polar, set LBB, zoom in and scroll around a bit
- speed up rect with atan2? - speed up rect with atan2?
- vips_resize() should not use the anti-alias filter if vips_shrink() has - vips_resize() should not use the anti-alias filter if vips_shrink() has

View File

@ -182,9 +182,9 @@ vips_mapim_region_minmax( VipsRegion *region, VipsRect *r, VipsRect *bounds )
TYPE py = p1[1]; \ TYPE py = p1[1]; \
\ \
if( px < 0 || \ if( px < 0 || \
px > resample->in->Xsize - 1 || \ px > resample->in->Xsize || \
py < 0 || \ py < 0 || \
py > resample->in->Ysize - 1 ) { \ py > resample->in->Ysize ) { \
for( z = 0; z < ps; z++ ) \ for( z = 0; z < ps; z++ ) \
q[z] = 0; \ q[z] = 0; \
} \ } \
@ -295,6 +295,7 @@ vips_mapim_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop )
case VIPS_FORMAT_FLOAT: case VIPS_FORMAT_FLOAT:
case VIPS_FORMAT_COMPLEX: case VIPS_FORMAT_COMPLEX:
LOOKUP( float ); break; LOOKUP( float ); break;
break;
case VIPS_FORMAT_DOUBLE: case VIPS_FORMAT_DOUBLE:
case VIPS_FORMAT_DPCOMPLEX: case VIPS_FORMAT_DPCOMPLEX: