I have been experimenting with various methods of automatic thresholding an image to black and white. I will have quite a few new scripts available in the next few days. However, in my experiments, I uncovered a bug or serious problem in how the IM function -lat works. It seems to shift the resulting image down and to the right by the size of the widthxheight parameter. Here is an example:
Original Image -- parts_neg.gif:
After processing with -lat 25x25+10%
Notice the border at the top and left and the fact that the image is shifted.
I wrote my own script to do something similar and it does not shift the image. Using my script I get this
Here is an animation to show the effect:
This is not a high priority for me. But I just wanted to inform you of this deficiency.
The function would work fine, if it were not for the offset. It should handle unfolding as for example in -convolve or -blur to avoid the image shift.
bug or deficiency of -lat in IM 6.4.4-10
Re: bug or deficiency of -lat in IM 6.4.4-10
We can reproduce the problem you posted and will have a patch in the ImageMagick Subversion trunk within a day or two. Thanks.