I have a folder of .ppm images ( ./overlays )
I have a single .ppm image (./ortho_photo.ppm) that I would like to blend each overlay image over using a photoshop style 'overlay' blend mode
I would like to save the blended images as jpegs with a sequential numbering system (./proc/processed_001.jpg ...002.jpg etc.)
Have tried various methods without much luck:
e.g
convert ./overlays/*.ppm -set filename: '%t' null: ./ortho_photo.ppm -compose overlay ./dest/%[filename:].jpg
Gives me a few images but not looking right and with weird names. Any help would be well appreciated!
Batch overlay multiple images over single source image, convert and save with sequential numbers
-
- Posts: 3
- Joined: 2017-12-01T03:55:25-07:00
- Authentication code: 1152
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Batch overlay multiple images over single source image, convert and save with sequential numbers
I'm not exactly sure what you want, but perhaps it is "hardlight", which is the same as "overlay" but swapping the two images.wrote:I have a single .ppm image (./ortho_photo.ppm) that I would like to blend each overlay image over using a photoshop style 'overlay' blend mode.
For the output filename "./proc/processed_001.jpg ...002.jpg", you can simple use "./proc/processed_%03d.jpg" as the output filename.
snibgo's IM pages: im.snibgo.com
-
- Posts: 3
- Joined: 2017-12-01T03:55:25-07:00
- Authentication code: 1152
Re: Batch overlay multiple images over single source image, convert and save with sequential numbers
Hey, yes, hardlight blending of the images would be fine.
I'm now trying:
convert *.ppm /Volumes/Data/RTI/sandbox/ortho/Waun-Mawn16-ortho_modified.comp.ppm -compose hardlight processed_%03d.jpg
Weirdly even though there are only 5 files in the current directory this command produces 10 images, none of which seem to have Waun-Mawn16-ortho_modified.comp.ppm blended into them.
I'm now trying:
convert *.ppm /Volumes/Data/RTI/sandbox/ortho/Waun-Mawn16-ortho_modified.comp.ppm -compose hardlight processed_%03d.jpg
Weirdly even though there are only 5 files in the current directory this command produces 10 images, none of which seem to have Waun-Mawn16-ortho_modified.comp.ppm blended into them.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Batch overlay multiple images over single source image, convert and save with sequential numbers
"-compose" is a setting. It does nothing to images, but effects "-layers composite" (and other operations). So insert "-layers composite" before the output name. See http://www.imagemagick.org/script/comma ... php#layers
You correctly had "null:" after the first list of input images, and you need this for "-layers composite".
You correctly had "null:" after the first list of input images, and you need this for "-layers composite".
Code: Select all
convert *.ppm null: /Volumes/Data/RTI/sandbox/ortho/Waun-Mawn16-ortho_modified.comp.ppm -compose hardlight -layers composite processed_%03d.jpg
snibgo's IM pages: im.snibgo.com
-
- Posts: 3
- Joined: 2017-12-01T03:55:25-07:00
- Authentication code: 1152
Re: Batch overlay multiple images over single source image, convert and save with sequential numbers
That's brilliant - thank you.