Skip to main content
January 20, 2011
Question

How to automatically superimpose pairs of images over each other?

  • January 20, 2011
  • 1 reply
  • 1571 views

I would like to find a way to automatize image superposition. The images are all located in one FolderX and the consecutive image of an image should be copied as second layer in the previous image and be saved under another name in another FolderY. e.g. picture 1 (green) + picture 1 (red) = picture 1 (green+red)

Folder X:

picture 1 (green)

picture 1 (red)

picture 2 (green)

picture 2 (red)

picture 3 (green)

picture 3 (red)

Thus the script should yield:

Folder Y:

picture 1 (green+red)

picture 2 (green+red)

picture 3 (green+red)

At the moment Iam getting along by combining “AutoIt” with a PS action. But the problem is that I cannot use the computer during the processing. I have never worked with JavaScript but if somebody could give me some advice it would probably work out. I have the ExtendToolScriptKit and would like to write it with that program. So my first question is how can I define in the script that pairs of pictures are loaded into PS? I thought of something like this but Im absolutely not familiar with the syntax:

For i = 1 to 3, step 1

var X = 1 ; X defines the current picture that should be processed

var FirstPicture = Picture”X” (green)

var SecondPicture = Picture”X” (red)

open (C:\FolderX\FirstPicture.tif)

open (C:\FolderX\SecondPicture.tif)

execute action 1 ; an action written in PS to copy image one as new layer into second image

save as FirstPicture (green+red) in C:\FolderY

close all images

X = X+1 ; to process next picture

next

thanks for your help,

Finn

This topic has been closed for replies.

1 reply

Paul Riggott
Inspiring
January 20, 2011
January 21, 2011

thanks a lot, this is exactly what I was looking for. I'ts working perfectly.