strange line in checkerboard (from mailing list)
Posted: 2009-09-04T11:33:28-07:00
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
> 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