bug or deficiency of -lat in IM 6.4.4-10

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

bug or deficiency of -lat in IM 6.4.4-10

Post by fmw42 »

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:
Image

After processing with -lat 25x25+10%
Image

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
Image

Here is an animation to show the effect:
Image


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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: bug or deficiency of -lat in IM 6.4.4-10

Post by magick »

We can reproduce the problem you posted and will have a patch in the ImageMagick Subversion trunk within a day or two. Thanks.
Post Reply