taking a part of a picture and saving it...

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

Mighty

taking a part of a picture and saving it...

Post by Mighty »

I frequent a website which offers a small photo gallery of 20 pictures that run at 150x600. These pictures can be separated or kept together in a long strip (4 columns of 5 pictures) to let you express yourself artistically, tell a short story or whatever... and I find myself often making one large picture (600x3000) and dividing it up into smaller parts and saving the divided parts as I go along.. and I would like to automate this because it's annoying and takes the fun out of making something good...

so here's what I would like to script:

-I have a file in a folder.
-I take the first top left 150x600 rectangle and save it.
-I take the one right next to it and save that.
-I do step 3 again twice
-I take the rectangle under the first one and save that
and so on and so forth, until the picture is divided into 20 equal parts and saved in the same folder as the first picture was with a labelling of the order in which they were saved.

Would anyone be able to push me in the right direction in doing this?
xbytor

taking a part of a picture and saving it...

Post by xbytor »

Here is a script I wrote for a client awhile back that breaks an image up into tiles. Specify the size of the tiles and set the overlap to 0 and you should be set.

-X
Mighty

taking a part of a picture and saving it...

Post by Mighty »

Ok, that gets me part of the way there...

thank you very much for that already..

next step, I would like to trim out all the empty part of each layer on the canvas and save them seperately..

any ideas there?
xbytor

taking a part of a picture and saving it...

Post by xbytor »

What is "the empty part of each layer"? Is it transparency or something else?

-X
Mighty

taking a part of a picture and saving it...

Post by Mighty »

yes, the transparancy.... just trim the canvas of everything that's empty..

Basically what I did before was set up a grid, copy a rectangle, open a new 150x600 file, paste the rectangle in that file, and save it as a full quality jpeg...

very time consuming really...
xbytor

taking a part of a picture and saving it...

Post by xbytor »

You can do this easily enough with an action. Just load the transparency selection and crop. That's it.

-X
Mighty

taking a part of a picture and saving it...

Post by Mighty »

yes.. but well, doing it twenty times... :$
xbytor

taking a part of a picture and saving it...

Post by xbytor »

Record an action and batch the action.

-X
Mighty

taking a part of a picture and saving it...

Post by Mighty »

good idea, thanks