David Neary wrote:
>
> To eliminate any risk of it (I should have done this the first time),
> the following fix is a bit better... Sorry for the mess!
... and of course, the comment should have been changed from "adding 1"
to "adding num_bands - 1 to height".
Again, many apologies for the error - I'm sure I'll do better next time
:)
Cheers,
Dave.
> ------------------------------------------------------------------------
> Index: ifscompose.c
> ===================================================================
> RCS file: /cvs/gnome/gimp/plug-ins/ifscompose/ifscompose.c,v
> retrieving revision 1.36
> diff -u -r1.36 ifscompose.c
> --- ifscompose.c 2000/11/27 10:35:23 1.36
> +++ ifscompose.c 2000/12/18 18:14:53
> @@ -1354,7 +1354,11 @@
>
> num_bands = ceil((gdouble)(width*height*SQR(ifsvals.subdivide)*5)
> / (1024 * ifsvals.max_memory));
> - band_height = height / num_bands;
> + band_height = (height + num_bands - 1)/ num_bands) ;
> + /* For bug #9156 - adding 1 guarantees that
> + * band_height*num_bands >= height > (band_height-1)*num_bands
> + * band_height automatically got rounded down, resulting in a diff
> + * of a few pixels when num_bands didn't divide evenly */
> if (band_height > height)
> band_height = height;
>
--
Dave Neary,
Software engineer, Informix Dublin.
Ireland.
Phone: +353-1-409-1357