D7 Image effect kit supported this options, and they are very useful:
- Border effect
- Rounded corner effect

Thank you.

Comments

shaisamuel created an issue. See original summary.

christophedg’s picture

Would indeed be great to have these!

mondrake’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
qzmenko’s picture

Status: Active » Needs review
StatusFileSize
new11.04 KB

Hello.

I added a new "border" effect.

tepelena’s picture

Can this be added to the module?

renrhaf’s picture

+1 :)

griffincox’s picture

+1 as well

griffincox’s picture

StatusFileSize
new424.7 KB

For those of you that need circular images now, I was able to find a work around. See the attached screenshot for the end result (in the top-right)

1. Download and install Image Widget Crop. Follow the documentation to get it working. Make sure to note what dimensions you're using in your image style. I used 300px by 300px.
2. Download and install image_effects and apply the following effects:

Manual Crop
Scale 300x300
Mask - Image (uploaded a white circle on a black background, 300px by 300px)
Background - Image (uploaded a white 300px by 300px square)
qzmenko’s picture

@tepelena, @Renrhaf, @griffincox
Guys, please add RTBC if patch works for you :)

mondrake’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests, +Needs title update, +Needs issue summary update

Hi

1) it looks like this patch only implements borders. The issue title and summary need update.

2) @qzmenko and reviewers please review the patch based on the DEVELOPING.md file. First and foremost, no automated test are implemented.

3) Why this?

+++ b/src/Plugin/ImageEffect/BorderEffect.php
@@ -0,0 +1,133 @@
+  /**
+   * {@inheritdoc}
+   */
+  public function transformDimensions(array &$dimensions, $uri) {
+    $dimensions['border_color'] = $this->configuration['border_color'];
+    $dimensions['border_thick_top'] = $this->configuration['border_thick_top'];
+    $dimensions['border_thick_right'] = $this->configuration['border_thick_right'];
+    $dimensions['border_thick_bottom'] = $this->configuration['border_thick_bottom'];
+    $dimensions['border_thick_left'] = $this->configuration['border_thick_left'];
+  }

Please look at other classes implementations of this method. The only keys for the $dimensions array are 'width' and 'height'. See https://api.drupal.org/api/drupal/core%21modules%21image%21src%21Entity%... also.

mondrake’s picture

By the way, what is the difference between this effect and a 'Set canvas' effect with relative size and defined color, like e.g.

Set canvas - Relative size: left: 3px right: 3px top: 3px bottom: 3px - Color: #FF8000

?

beautifulmind’s picture

The short way is to use imagick instead:
https://drupal.org/project/imagick along with imagick extension, imagemagic binary and libmagicwand-dev

It offers rounded corner preset out of the box.

Overhead:
Once the image is processed, it will be used subsequently and will not be processed again henceforth, unless you change it.

mondrake’s picture

Status: Needs work » Closed (outdated)

Closing any stale issue with latest comment over 5 years old.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.