On the page:

    http://www.imagemagick.org/Usage/thumbnails/#rounded_border

the example syntax breaks down rapidly when larger images and
border widths are used.

Maybe I'm misunderstanding something.

I have a set of large images which require different rounded
corner frames being used.

Here's the test syntax I'm using, with commands numbered...

# (#1) create a red rectangle of the size of one image
convert -size 2736x1830 xc:red red.gif

# (#2) create the magic graphics file which appears to require 'w-...' and 
'h-...'
# to match border amount to even get close to creating a working frame
convert red.gif -border 100 -format \
         'roundrectangle 1,1 %[fx:w-100],%[fx:h-100] 159,159' \
         info: > tmp.4755.1.rounded_corner.mvg

# mvgfile == roundrectangle 1,1 2836,1930 159,159

# (#3) this command seems to work as changing white to any other color creates
# a very nice anti-aliased, rounded corner mask
convert red.gif -border 100 -alpha transparent -background none -fill white \
         -stroke none -strokewidth 0 -draw '@tmp.4755.1.rounded_corner.mvg \
         tmp.4755.2.rounded_corner_mask.png

# (#4) this command breaks badly which shows up more pronounced as border
# width increases, rounding artifacts or distortions increase
convert red.gif -border 100 -alpha transparent -background none -fill none \
         -stroke black -strokewidth 100 -draw '@tmp.4755.1.rounded_corner.mvg' \
         tmp.4755.3.rounded_corner_overlay.png

# (#5) these two commands also break as it appears that to work, the original
# image fails to line up at 0,0 at the beginning of the operation which appears
# to require cropping the image by the border width of 100 to come out correctly
convert red.gif -matte -bordercolor none -border 100 
tmp.4755.2.rounded_corner_mask.png \
         -compose DstIn -composite tmp.4755.3.rounded_corner_overlay.png 
-compose Over \
         -composite tmp.4755.4.red_framed_1.png

convert red.gif -matte -bordercolor none -border 1 
tmp.4755.2.rounded_corner_mask.png \
         -compose DstIn -composite tmp.4755.3.rounded_corner_overlay.png 
-compose Over \
         -composite tmp.4755.5.red_framed_2.png

_______

Questions...

First, on command #4, let me know the correct syntax to create rounded corners 
with no
distortion. In other words, rounding which is as clean as command #3.

Second on command #5, let me know the correct syntax to create the final image 
aligned
to 0,0 for the operation.

Thanks!

-- 
Love feeling your best ever, all day, every day?
Click http://RadicalHealth.com for the easy way!
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to