1

I have 10 png images, each one is 48x48 (pixels). They all have a transparent background. I want to make a 480x48 sprite sheet, so I need to put each image side by side and that's where I'm having problems.

Everytime I copy one of the images, I only copy the shape inside of it (let's say an icon), so when I paste it into the sprite sheet layer, I don't have a 48x48 selection, but 32x32 or 20x20, or 48x10, etc, depending on how big the shape is. This is bad because I have to move it until I match the exact place where it needs to be. I want to copy and paste the whole image, including the transparent background, so the placement adjusts to a 48x48 selection.

The closest thing that I have tried is "Place...", it preserves the size of the original layer but I'm getting undesired results when I try to place certain images - they are placed but in a really small size and I need to resize them, which results in more work than I'm trying to avoid.

I really think this can be easily done, because it's very simple when you have "normal" pictures but in this case I'm working with transparent backgrounds and I can't seem to find a correct approach to solve this.

Btw, every png image that I open is opened just as a layer, if that's any help.

1
  • use imagemagick
    – joojaa
    Sep 14, 2014 at 10:33

1 Answer 1

2

The easiest way would be to create a temporary layer with a fill, which will travel with the icon layer to the sprite sheet, where, after it has served it's purpose, can be deleted.

  1. New (temporary) layer in the 48 x 48 px document (Layer menu > New > Layer…)
  2. Fill the layer (Edit menu > Fill… > Black, or whatever). Send this layer to back.
  3. In the Layers palette, select both layers, link them together
  4. Drag and drop into the sprite sheet document
  5. Position as required - your temporary layer is exactly 48 x 48 px so snaps to the edges of the sprite sheet
  6. Leave the temporary layer in place to serve as the snap-to point when placing the next icon.
  7. Once all icons are placed delete the temp layers.
1
  • That did the trick! Thank you so much. The important bit here for me was linking the layers, not merge or combine them as I was trying before. I knew it would be really simple. Thanks again! :)
    – absay
    Sep 14, 2014 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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