PhotoshopForums.com Home
Navigate Contact FAQ Search Members
Merging Thousands of Images
Post new topic   Reply to topic    PhotoshopForums.com Forum Index -> Manipulation
 See a User Guidelines violation? Please contact us.
Author Message

tetrakarbon

Joined: 17 Oct 2005
Posts: 2



PostPosted: Mon Oct 17, 2005 12:59 pm    Post subject: Merging Thousands of Images Reply with quote

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 Frown Thanks!

-- Ned Ruggeri
View user's profile Send private message

Datameister

Joined: 28 Jun 2005
Posts: 506



PostPosted: Mon Oct 17, 2005 10:40 pm    Post subject: Reply with quote

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!
View user's profile Send private message Visit poster's website

ekosh

Joined: 01 Jun 2005
Posts: 216
Location: US of A


PostPosted: Tue Oct 18, 2005 12:33 am    Post subject: Reply with quote

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 Frown That is going to be one very large file when you are done :)
View user's profile Send private message AIM Address

cbadland

Joined: 19 Jan 2005
Posts: 962



PostPosted: Tue Oct 18, 2005 7:41 am    Post subject: Reply with quote

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.
View user's profile Send private message

tetrakarbon

Joined: 17 Oct 2005
Posts: 2



PostPosted: Tue Oct 18, 2005 7:48 am    Post subject: Reply with quote

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!
View user's profile Send private message

cbadland

Joined: 19 Jan 2005
Posts: 962



PostPosted: Tue Oct 18, 2005 8:04 am    Post subject: Reply with quote

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.)
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PhotoshopForums.com Forum Index -> Manipulation All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
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


Contact - User Guidelines >

Copyright © 2003-2016. PhotoshopForums.com, iFroggy Network. All Rights Reserved.
Powered by phpBB © phpBB Group. phpBB SEO. Privacy Policy.
We are in no way affiliated with Adobe. Photoshop, Adobe and related marks are registered trademarks of Adobe.
PhotoshopForums.com