Photoshop: Is there any way to set a crop size with Adobe Generator?

  • 2
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)
For example, if I have a PSD that is 32x32 (pixels) and I have an icon in a layer group that is 30x24 - is there any way to generate that asset at the 32x32 size?

Note that I don't want the icon scaled to 32x32... I want it centered within that area (exactly as it is in the PSD).

I haven't figured out any way of doing this, and the documentation is a bit sparse. If that feature doesn't exist, it would be extremely useful.
Photo of James Rhoades

James Rhoades

  • 2 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 2
Photo of Tim Riot

Tim Riot, Employee

  • 8 Posts
  • 2 Reply Likes
Hey James,

We're working on getting pixel padding functionality into the next release of Generator. Checkout the issue which tracks this on github, so you can see our work on it up to this point: https://github.com/adobe-photoshop/ge...

-Tim
Photo of James Rhoades

James Rhoades

  • 2 Posts
  • 0 Reply Likes
That's great news Tim. Generator is awesome by the way... has already saved me a ton of time. Thanks!
Photo of PECourtejoie

PECourtejoie, Champion

  • 795 Posts
  • 285 Reply Likes
Photoshop CC 14.2 now includes pixel padding through layer masks.
Photo of Chris Herrmann

Chris Herrmann

  • 1 Post
  • 0 Reply Likes
I'm having a similar issue, I have assets that extend past the canvas size which i want cropped but generator saves out everything and makes my file wider than the canvas. So far my workaround has been to include a layer mask that covers the entire canvas. Just kinda messy and an extra step I don't like. Is there a better way?
Photo of Gafyn

Gafyn

  • 1 Post
  • 0 Reply Likes
@Chris Herrmann not an ideal solution, but works for me - thanks for the info!
Photo of Elliott

Elliott

  • 100 Posts
  • 5 Reply Likes
Having the same problem, but the reverse, when assets are smaller than the canvas I don't want Generator to crop the canvas, but maintain the aspect ratio for every resize. Has a fix to this been introduced yet?
Thanks!
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14551 Posts
  • 1917 Reply Likes
Add an empty mask to the layer. Does that do what you want?
Photo of Elliott

Elliott

  • 100 Posts
  • 5 Reply Likes
as in select all > mask? That seems to work. I guess that's the only workaround for now?
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14551 Posts
  • 1917 Reply Likes
Correct.
Photo of Anne Mahoney

Anne Mahoney

  • 1 Post
  • 0 Reply Likes
How do you do this? I have tried layer masks and alpha channels and my transparent png's are still cropped.
Photo of Elliott

Elliott

  • 100 Posts
  • 5 Reply Likes
The layer mask thing does work for me when I want to add padding or not crop to the exact size of the image.

But I'm having the opposite problem now. I'm try to export a layer from photoshop as a PNG, and I don't want it cropped to the bounds of the document. My layer extends beyond the bounds of my PSD, but whenever it gets exported Generator is cropping the layer to the bounds of my PSD.

How do I get Generator to export the entire layer even if it goes out of the bounds of the document?
Photo of designbooth limited

designbooth limited

  • 4 Posts
  • 0 Reply Likes
lame lame lame - I have just found adobe generator and the one thing everyone wants it to do is crop to the canvas size and it doesn't do it