Rounded Corners with the Command Line Interface
Posted: 2011-12-20T14:49:19-07:00
Hi!
I'm using ImageMagick with the following syntax:
convert [FILENAME] -morphology close disk:[WIDTH OF IMAGE / 100]
[FILENAME]
All it's doing is taking a QR code and rounding off the edges of the
little squares.
My problem comes when the QR code's background is transparent. Observe:
http://qrustom.com:5000/customize.png?f ... 5744e89e1e
The transparency turns black, as opposed to transparent, because the
alpha channel disappears for some reason. Of course, this isn't
ideal....I've been hunting through the documentation trying to find a
way to get morphology to accept transparent as a background color, but
none of the options I've tried are working--'-transparent #00000000',
'-alpha set', '-channel RGBA' are all failing me.
Does anyone have an idea of how to get morphology to work or, if I'm
doing things all wrong, how to round the corners without boffing the
alpha channel?
Thanks!
I'm using ImageMagick with the following syntax:
convert [FILENAME] -morphology close disk:[WIDTH OF IMAGE / 100]
[FILENAME]
All it's doing is taking a QR code and rounding off the edges of the
little squares.
My problem comes when the QR code's background is transparent. Observe:
http://qrustom.com:5000/customize.png?f ... 5744e89e1e
The transparency turns black, as opposed to transparent, because the
alpha channel disappears for some reason. Of course, this isn't
ideal....I've been hunting through the documentation trying to find a
way to get morphology to accept transparent as a background color, but
none of the options I've tried are working--'-transparent #00000000',
'-alpha set', '-channel RGBA' are all failing me.
Does anyone have an idea of how to get morphology to work or, if I'm
doing things all wrong, how to round the corners without boffing the
alpha channel?
Thanks!