Search code examples
graphicsmagick

Use GraphicsMagick to compose image with itself


I'm using GraphicsMagic to achieve an effect something like:

  1. read in an image file
  2. apply several edits (resizing, cropping, etc)
  3. apply a convolution filter
  4. apply an operator

and it works fine. However, what I really need is composite result of step (2) on top of the result of step (4). That is, after step 2 I want to convince GM to (notionally) make a clone of the current state of the image, apply step 3+4 to the clone, and then composite that clone underneath the original pre-clone state.

Is stuff like this possible in GM without writing out an temp file? I'm calling gm from the node wrapper, so I don't think shell script wizardry is an option.


Solution

  • For posterity, I wound up writing temp files to achieve this. I don't think it's possible to get such effects purely with a combination of GraphicsMagick arguments.