Use imagemagick to add a round border
This just adds a frame with a rounded inner border on top of the target image. The example below assumes that (1) you have imageMagick already installed, and (2) your target image is a 960x960 PNG file that uses the filename MyImage.png.
Use a text editor to create an SVG file of our frame. Copy and paste the code below to a text editor, and save as roundEdge.svg. This is SVG code for a frame with inner corners that are rounded.
Use ImageMagick to convert this SVG to a PNG.
Use ImageMagick to overlay the new PNG on top of the target image.
A few notes here:
- Technically, we can just create the PNG frame, but I prefer to use an SVG first since I plan to apply this command to several images with varying heights and widths. I've found that using one SVG file that I can repeatedly resize based on my image requirements resulted in better 'roundness' of the edges. The PNG version would sometimes result in stretched and distorted frames.
- Remember to change the 960x960 parameter to your target image's specifications.
Comments
Post a Comment