Large Image Batch Processor - Slicing Up Images For Later Stitching Togther

I am working with some extra large images that I would like to slice into as few parts as possible (typically in half) so they can be stitched together for a printing job as the manufacturer’s server is not set up to handle images this big. I can do this by hand in CS6 Photoshop, but would really like to make a little batch processor to work on the images in the background.

The problem is that I am running into the pixel limit, which I’ve seen stated as being either 32,000 or 30,000.

As an example I might have a 2.1GB tiff master image. To make this image more useable I convert it to a png of roughly 512MB using a special PS plugin as PS will not allow png images this large to be saved without the plugin. The png is then divided in half in PS and saved as two images which are stitched together for printing job. Each half is around 325MB and are small enough to be uploaded to the printer’s servers.

The file sizes I speak of are as seen in the Finder under File:Get Info under Mavericks as opposed to what they actually be in RAM. Memory should not be an issue; however, as my my Mac Pro has 48GB installed for graphics work. This app is for my own use so I need not worry about other users.

Any advice on how to handle larger images? I am thinking this will probably require a plugin will it not?

Your 32-bit Xojo apps can only address 3.5GB of memory, so your 48GB of RAM isn’t going to help. It’s a hard limit until Xojo supports 64-bit.

I made a stitching program (not Xojo) and I ran into memory issues as like Xojo its only 32 bit… the one I did stitched images 2x2 or up to 10x10
I guess you could backward engineer what we did, we used a list box which specified the image split, you need to get the image size and create a table based on this so if it’s 2x2 you have row 1 column 1, row 1 column 2, row 2 colum1, row 2 column 2, then split it somehow, for me the split was render output and just rendered out the tiles, our program is C# so not much use here I never got around to doing a Xojo version

I tested mine to 10000x10000 image at a 10x10 split and that worked fine, the reason I did it was GPU rendering is fast but there’s a limit on how much memory they have so rendering out tiles is less strain or helps users with slower systems

I really only need the application to do the splitting and saving of the separate parts so the main issue is opening the large image to begin with. Stitching them back together would be done by the printer. Typically slicing a large 32,400 x 21,600 pixel image in half PS would bring those two images below the individual upload limit of the printer.

Your 32-bit Xojo apps can only address 3.5GB of memory, so your 48GB of RAM isn't going to help. It's a hard limit until Xojo supports 64-bit.

Yikes, I didn’t think of that.

I see that monkeybread offers a LargeImage plugin. Has anyone used monkeybread’s plugin collection for larger images here?

You could acutally automate it in photoshop itself by creating a droplet executing an action which slices accordingly.

You could also do this quickly using imagemagik if you have it (FREE):
Instructions http://www.imagemagick.org/Usage/crop/#crop_tile

Basic example is like this:

convert IMG.png -crop 2x1@ +repage +adjoin IMG-slice_%d.png

This will take the image IMG.jpg and split it into two pieces (splitting vertically). ImageMagick reads and writes photoshop files as well. You can slice into as many pieces as you want. If you are using photoshop files you may need to flatten them first by adding “-flatten”… like this:

convert IMG.psd -flatten -crop 2x1@ +repage +adjoin IMG-slice_%d.png

Let me know if this helps.

MonkeyBreadSoftware (MBS) plugin has a “LargePicture” plugin that handles much of the details for you:
https://www.monkeybreadsoftware.net/class-picturembs.shtml