Search code examples
gridphotoshopslicedivide

How to create a photoshop script to divide a layer into a grid of separate layers


I have been looking for a solution but I don't think this is possible without writing a script. What I want to do is take a single photoshop layer and divide it into a grid of squares where each square is a separate layer (e.g. a 100px by 100px image broken into 100 10px by 10px squares, each a separate layer).

I know that I can slice the image into a grid and export each square as a separate image, but I want each square to maintain it's position so when all the layers are visible it forms the original image seamlessly (like a bunch of square puzzle pieces).

Any help would be appreciated! Thanks!


Solution

  • Someone responded in the SuperUser forum and wrote me a really nice script. Does exactly what I need it to do and it scales perfectly for differently sized squares and differently sized documents.

    https://superuser.com/questions/425811/is-it-possible-in-photoshop-to-convert-slices-into-photoshop-layers