strange line in checkerboard (from mailing list)

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
perl@nevcal.com
Posts: 34
Joined: 2009-09-04T11:26:13-07:00
Authentication code: 8675309

strange line in checkerboard (from mailing list)

Post by perl@nevcal.com »

On approximately 9/4/2009 12:05 AM, came the following characters from the keyboard of Anthony Thyssen:
> On Thu, 03 Sep 2009 23:29:37 -0700
> Glenn Linderman <perl@nevcal.com> wrote:
>
> | convert -size 787x300 xc:white -stroke black -fill white -tile
> | pattern:checkerboard -draw "rectangle 0,0 787,300" -threshold 50 rect.tif
> |
> | produces a strange dark line near the right edge of the image.
> |
> | One could speculate that it has something to do with the stroke, which
> | is otherwise invisible, except that it isn't quite at the end, where the
> | stroke should be. I couldn't think of any other speculative reasons, so
> | here's this email!
> |
>
> Looking closer...
>
> I had to remove the -threshold 50 as it comes out all white otherwise.
> Sure you did not means 50%???

As my next message said, I did mean 50% but dropped the % by accident when pasting into the email.

But your comment about "all white" confuses me... my resulting image (without the %) came out all dark grey, with a black line at the right almost-to-the-edge (viewed by Irfan View) or all black, with the black line not visible, except for one pixel in the upper right corner, that interferes with the otherwise mostly white line one pixel in from the left and top edges. So it seems that something is "funny" about that.

>
> Replaceing the threshold and the save to the TIF file replace with....
>
> -rotate 180 -crop 20x20+0+0 -scale 1000% show:
>
> I can see the very slight darkening.


I don't see this, but I don't have show: available on Windows, AFAIK (I get an error). So I save to a file, and still don't see any darkening.


>
> The stroke draws a line just outside the image. You can make that stroke visioble by doing...
>
> -draw "rectangle 0,0 786,299"

Did this

convert -size 787x300 xc:white -stroke black -fill white -tile pattern:checkerboard -draw "rectangle 0,0 786,299" -threshold 50% rect.tif

Curiously, IrfanView shows black and white checkerboard squares, whereas PhotoShop shows the white squares with 4 vertical lines through them!

But both shows a dark black vertical stroke a bit inside the right edge.

I'm surprised that the black vertical stroke is darker than the squares, after a threshold, which I thought produced only the blackest black and whitest white.


> instead. However the very very very slight darkening I will vanish
> if I move the rectangle border further away.
>
> -draw "rectangle 0,0 788,301

I don't see any change for this size, either.

>
> The default width for stroke is 1 pixel, but it is a floating point
> number so it could overflow the pixel boundary very very slightly.
> If you don't want this use +anti-alias to turn of aliasing effects.

I don't see any change with the following command, either:

convert +antialias -size 787x300 xc:white -stroke black -fill white -tile pattern:checkerboard -draw "rectangle 0,0 788,301" -threshold 50% rect.tif

>
> Also if instead of adjustingthe -draw I add -strokewidth 0.9 before
> the draw the slight darkening will also reduce in amount, to where it
> is barely noticable unless you look at actual color values.
>
> I would say -strokewidth is slightly too wide. But only very very
> slightly, and not really much of a real problem.
>
>
> If you thing it is a problem, start a topic on the Discussion forum 'Bugs'
> section.viewforum.php?f=3

Here it is.

ImageMagick 6.5.4-Q8
perl@nevcal.com
Posts: 34
Joined: 2009-09-04T11:26:13-07:00
Authentication code: 8675309

Re: strange line in checkerboard (from mailing list)

Post by perl@nevcal.com »

Not wanting to spin my wheels, and noticing a newer version of ImageMagick available for download, I installed it, hoping the problem I reported above, would go away, since Andrew didn't seem to have the same symptoms. However....

Now the command

convert +antialias -size 787x300 xc:white -stroke black -fill white -tile pattern:checkerboard -draw "rectangle 0,0 788,301" -threshold 50% rect.tif

produces:

The applications failed to initialize properly (0xc0150002). Click on OK to terminate the application.
perl@nevcal.com
Posts: 34
Joined: 2009-09-04T11:26:13-07:00
Authentication code: 8675309

Re: strange line in checkerboard (from mailing list)

Post by perl@nevcal.com »

In fact, just a plain


convert


also produces that message. Is the latest build a bad build?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: strange line in checkerboard (from mailing list)

Post by magick »

Install Visual C++ 2008 Redistributable Package (x86) or Visual C++ 2008 Redistributable Package (x64). 64-bit Windows requires both packages (x86 & x64). See the last paragraph of http://www.imagemagick.org/script/binar ... hp#windows.
perl@nevcal.com
Posts: 34
Joined: 2009-09-04T11:26:13-07:00
Authentication code: 8675309

Re: strange line in checkerboard (from mailing list)

Post by perl@nevcal.com »

Thanks. That made the latest version run.

And now I can see the vertical black line from the first message using the very latest version of ImageMagick. :(
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: strange line in checkerboard (from mailing list)

Post by magick »

We can reproduce the problem you reported and will have a patch within a day or two. Look for it in the next point release of ImageMagick. Thanks.
Post Reply