Download the PHP package spacecatninja/imager-x-rounded-corners without Composer
On this page you can find all versions of the php package spacecatninja/imager-x-rounded-corners. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download spacecatninja/imager-x-rounded-corners
More information about spacecatninja/imager-x-rounded-corners
Files in spacecatninja/imager-x-rounded-corners
Package imager-x-rounded-corners
Short Description Rounded Corners Effect for Imager X
License MIT
Informations about the package imager-x-rounded-corners
Rounded Corners Effect for Imager X
A plugin for rounding image corners using Imager X.
Also, an example of
how to make a custom effect for Imager X.
Requirements
This plugin requires Craft CMS 4.0+/5.0+, Imagick image driver, and Imager X 4.0/5.0+r.
Please note, this plugin will not work if you're on a version of Imagick 3.4.4 that is compiled with ImageMagick 6.x. You can use Imagick 3.4.4 compiled with ImageMagick 7.x, or Imagick 3.4.3 with ImageMagick 6.x.
Installation
To install the plugin, follow these instructions:
- Install with composer via
composer require spacecatninja/imager-x-rounded-corners
from your project directory. - Install the plugin in the Craft Control Panel under Settings > Plugins, or from the command line via
./craft install/plugin imager-x-rounded-corners
.
Usage
After installing the plugin, you can use the roundedcorners
effect as you would
any other effect in Imager X, ie:
The background color can be customized using the normal bgColor
setting:
If the output image is a png, the background can be transparent:
If you want to use the plugin to make a completely round image, you'll notice an edge case (such a good pun, you'll see) where the antialiasing will make the right edge of the image appear to be cut off. This is a common problem whenever making transparent images for the web, no matter what tool you use. In PhotoShop and similar, the solution is to shrink the contents and leave some transparent pixels around the image.
This plugin has a similar hack, which you can unlock by passing an object
as a parameter, and setting fixEdge
to true
, like this:
This will make the mask that is used to cut out the rounded image 1px smaller, ie 599x599px. Visually, this will fix the antialiasing issue.
Price, license and support
The plugin is released under the MIT license. It requires Imager X, which is a commercial plugin available in the Craft plugin store. If you need help, or found a bug, please post an issue in this repo, or in Imager X' repo.