Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a SpriteSheet using Photoshop's Scripts>Export layers to files. Thinking about using each layer as a frame. This is what i am doing...

I have a layer with a rectangle in it. I want to duplicate the layer multiple times and in each duplicate, I want to increase the size of the rectangle by 2px.

I create an action with the following steps

  1. Copy the layer with a rectangle
  2. Transform the rectangle in the new layer
  3. Increment the height by 2 px

When I save the action, it stores the height in % rather than pixels which I would need.

If I repeat this action a multiple times, I do not get a smooth transition. Is it possible to increase the height in pixels? Is there a better way to implement this?

Thanks, Amrish

share|improve this question
This questions/answers over at gamedev.SE might be interesting for you:…,… Just export your layers as separate image-files and use a specialized tool to build the sprite-sheet. Probably faster and easier than using Photoshop for that. – bummzack Mar 21 '11 at 11:02
up vote 2 down vote accepted

First off: I have no experience with sprites. So I can't really tell if this is the best way to go (overlapping layers and stuff)

You could do this using "Canvas size...".

  • create an image with the smallest dimensions
  • make new layer and fill it with the color of your choice.
  • Now record your actions:

    1. Go to image -> Canvas Size...
    2. Activate the relative option
    3. Change the units to pixels and insert the size increment you want into the height box (in your case width should be "0")
    4. after clicking OK create a new layer
    5. fill it with the bucket
    6. Stop recording. And play the action every time you want to increase the size.
share|improve this answer

I recently started playing with scripting Photoshop and I took a few minutes to mess with this simple problem as a way to get some practice. While I used VBScript, if you are in any way competent with programming, you could probably port it to applescript or javascript if you need to.

The layer resizing looks like it is, unfortunately, percentage based by design but through scripting it is possible to make the math conversions.

I put the script here:

In windows, vbscript is a plain text file where you rename it VBS and it will be executable. As always with the internet, if you don't understand what it does, DO NOT RUN IT.

It has no real error checking, so its more a proof of concept. It grabs the first document it sees, and presumes the specially-named layer is transparent except for the rectangle.

share|improve this answer

See answer to this other question [related]:
automation for repetitive tasks in photoshop?

share|improve this answer

I've been using Texture Packer to create sprites for my iPhone game. Another great tool is Zwoptex

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.