Posted: Mon Oct 17, 2005 12:59 pm Post subject: Merging Thousands of Images
Hi guys! I'm creating a large map from the thousands of small, 256x256 pixel maps from google maps. I have already written a script that downloaded all the images, and saved them with a name indicating where they ought to be on the map (say, 1-1.png is top, left hand corner).
Anyway, I have to now piece all of these images together. There are about 1,800 images, so doing this by hand is a real pain (I actually have already done about 1/8th of the work, and it took 1.5 hours so far). So here's my question: is there a way in photoshop to automate this.
I know about droplets and batch things, etc. But I don't know how to make 'merge two images, with the second directly placed directly below the first in the new image.' If I knew how to do this, I could create ~60 columns with everything lined up.
Any suggestions guys? Without an alternative, I'm afraid I might have to give up Thanks!
No idea...but I'd love to learn how to do it! Anyone else? _________________ Interested in showcasing your special effects or learning some new ones from the masters? Check out PSFX!
you may be able to write an action that would do it for you, but I never do it so I cant tell you how That is going to be one very large file when you are done
I thought there was a way using File>Automate>Contact Sheet to do what you want. But when I try… I can get the images in rows to adjoin or images in columns… but not both.
Maybe one of the Photo Mosaic apps has a preference to create a composite by file name.
You could try an action, but might run into problems placing images correctly.
Thanks for all the advice guys! I figured out to do it, so I’m all set. Here’s how to do so, for anyone needing to know in the future. I won’t go into how to get images off Google maps, though if anyone’s ever interested, send me an email (rug5geri56uchi5cago5.ed5u – delete 5’s, turn 6 into an @). The way I did it was using ImageMagick for windows. I wrote a Java program to take advantage of its DOS command line, montage. Basically, this is the line:
Montage –geometry +0+0 rowX.bmp imageToMergeX.png rowX.bmp
This appends the image ToMergeX.png to the right of rowX.bmp’s image, saving the result as rowX.bmp. Using a for loop, I continually appended a sequence of images (the horizontal slices of the map) to a horizontal slice file. I created a second, outer for loop in order to get to the next slice. Here’s the program in Java, using the convention x-y.png:
Code:
import java.io.*;
public class mergehoriz
{
private static int startx = 16773;
private static int endx = 16834;
private static int starty = 24329;
private static int endy = 24397;
public static void main(String args[]) throws java.io.IOException, java.lang.InterruptedException
{
for(int y = starty; y <= endy; y++)
{
for(int x = startx; x <= endx; x++)
{
String prelim = y + "-horiz.bmp";
String merger = x + "-" + y + ".png";
String[] CMD = {"montage", "-geometry", "+0+0", prelim, merger, prelim};
Process p = Runtime.getRuntime().exec(CMD);
p.waitFor();
System.out.println(x - startx);
}
}
}
}
Now I’ll just have to put together the 60 horizontal slices, but this isn’t a big problem for me. I actually don’t know how to use montage for vertical stacking, but I won’t need to for what I do.
Take it easy everyone! Hope this helps if you ever get a similar problem!
Thanks for posting the info.
But, if I understand right, Automate>Contact Sheet in Photoshop should be able to do what this does. (make a long horizontal row of appended images.)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum