Page 1 of 1

Create inner frame with offset

Posted: 2019-07-15T00:17:08-07:00
by The Guy from CGN
Good Morning,

I changed my RAW converter from Lightroom (LR) to Capture1 (C1). Within LR I have been used LR/Mogrify2 plugin [1] to place watermarks, text annotations, frames etc, but with C1 have to create my own scripts.
It was no big deal to create scripts which add watermarks and text annotations. But with the frames I have no glue how to solve. Here you can see what kind of frame I would like to create:
Image
It's not good visible on this image but the frame has an opacity of 60%.

The dimensions I have sketched here:
Image

I have tried frame, border, shave etc but not solution found. I can add a frame outside the image with or without changing the image dimensions. The frame should not have an absolut dimensions but relative to the image border because not all images will have the same resolution.

I expect that it is possible with Imagemagick because the a.m. plugin for LR works completely with Mogrify.

Do you have a hint or maybe a solution for my problem?

Thanks for your support!


[1] https://www.photographers-toolbox.com/p ... grify2.php

Re: Create inner frame with offset

Posted: 2019-07-15T06:37:24-07:00
by snibgo
I'm not sure what you want, and your images are too small to help me.

There are many ways to do this. The following takes an input (toes.png) and makes a copy that is white but the outermost 15 pixels are 50% gray. This is used to change the opacity. The result is flattened against red, so the result is the toes image but with the outermost pixels shaded red. Then we add a pink border.

Code: Select all

magick ^
  toes.png ^
  ( +clone ^
    -fill White -colorize 100 ^
    -shave 15 ^
    -bordercolor gray(50%%) ^
    -gravity center ^
    -border 15 ^
  ) ^
  -alpha off ^
  -compose CopyOpacity -composite ^
  -background Red ^
  -compose Over -layers Flatten ^
  -bordercolor Pink ^
  -border 20 ^
  out_bord2.png
Image
Change the colours etc as you want.

Re: Create inner frame with offset

Posted: 2019-07-15T07:16:30-07:00
by The Guy from CGN
Thanks for your reply. This is an interesting solution.
1. Clone the image
2. Shave that by 30 px
3. Add a colorized border of 15 px

For the colour I could also use RGBA(R,G,B, opacity).

I will give it a try.