im_lhisteq() checks for window too small

This commit is contained in:
John Cupitt 2008-06-23 09:44:28 +00:00
parent 6d86a4df62
commit 7f0378d962
2 changed files with 7 additions and 0 deletions

View File

@ -27,6 +27,7 @@
packages are not on the default path (or in $prefix). This avoids some
accidents on some platforms
- configure prints a summary of optional packages found at the end
- im_lhisteq() checks for window too small
25/1/08 started 7.14.0
- bump all version numbers for new stable

View File

@ -20,6 +20,8 @@
* - expand input rather than output with new im_embed() mode
* - _raw() output is one pixel larger
* - sets Xoffset/Yoffset
* 23/6/08
* - check for window too small as well
*/
/*
@ -162,6 +164,10 @@ im_lhisteq_raw( IMAGE *in, IMAGE *out, int xwin, int ywin )
im_error( "im_lhisteq", _( "window too large" ) );
return( -1 );
}
if( xwin <= 0 || ywin <= 0 ) {
im_error( "im_lhisteq", _( "window too small" ) );
return( -1 );
}
if( im_cp_desc( out, in ) )
return( -1 );
out->Xsize -= xwin - 1;