How to add a "soft crop" frame to an image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
art11s
Posts: 2
Joined: 2014-02-28T12:18:17-07:00
Authentication code: 6789

How to add a "soft crop" frame to an image

Post by art11s »

As part of our workflow, photo producers would open an image in Photoshop and tone the "soft cropped" area (just a box marked inside the full size image). Before that step I need to insert the crop metadata into an image, that would display the crop box when opened in Photoshop. One way to generate a soft crop box in Photoshop is to insert a path or clipPath. Is it possible to add those using ImageMagick? If not, are there any alternatives?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to add a "soft crop" frame to an image

Post by snibgo »

I don't think IM can add a clip path. It could add another raster layer, which might be transparent except for the clip outline, etc.

You could do it as a script in Gimp. Does Photoshop have a script facility? If so, that would be another possibility.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to add a "soft crop" frame to an image

Post by fmw42 »

Can you provide an example of your "soft cropped" result? I am not sure I understand what processing you are doing? Is it just processing a rectangular area in the image to make it brighter or darker? Where does the crop come in?

In IM you can use -region to process a rectangular area of the image. But as user snibgo has pointed out, I do not know that IM can put those coordinates into your image automatically. You could possibly get the coordinates and insert them using EXIFTOOL as a clip-path. But I do not know enough about doing that. It is just a suggestion to look into.

see
http://www.imagemagick.org/Usage/masking/#clip

for clip path, clip, mask and region
art11s
Posts: 2
Joined: 2014-02-28T12:18:17-07:00
Authentication code: 6789

Re: How to add a "soft crop" frame to an image

Post by art11s »

I'm receiving the original image and separate file with metadata about the crop geometry from a feed. The objective is draw a rectangle as a marker to let the users know that they only need to tone that area. But don't want to modify the actual image by drawing shapes, etc as they might want to change the size of the crop later. That's what the path in Photoshop allows you to do.

Will research the exiftool.
Post Reply