Imaging tool to slice a scene into smaller images

I’m looking for a software tool to slice an image into smaller ones. It will be a part of a much bigger project so the effort to export the output should be minimal. It doesn’t matter if the initial setup takes time but making a change into the scene and taking an export will be something that we would be doing regularly so it should be doable with minimal effort.

Here’s an example of what I’m looking for in the tool.

Consider the following image as my scene:

enter image description here

The two white and blue boxes show the output slices that I’m expecting to have as exported files. The white one contains the gate and the blue one its shadow. The tricky part is that I’m expecting to have them like this:

enter image description here
enter image description here

Which means that the background picture is invisible in the exported files. I have the gate and its shadow in separate layers so I can easily produce the desired output (as above) manually but I’m looking to a tool to do that for me automatically (as I might be exporting this a thousand times).

Perhaps I can set which layer is visible in each slice! I mean that would be great.

Does anyone know such a tool? Inside or outside of Photoshop?

Answer

If you convert each layer or layer group to a smart object, you can double-click and open them up as if they are their own auto-cropped psd file and save out your image from there.

With this in mind, try creating an action (or script) to:
1. convert current layer to smart object and open it.
2. save as png (or whatever)
3. return to original psd and undo x steps.

You could rasterize instead of undo, but this would flatten any layer groups.

Not sure if this is possible with actions, but it is something that is definitely achievable with scripting if you know javascript.

Attribution
Source : Link , Question Author : Mehran , Answer Author : John

Leave a Comment