Friday, September 4, 2015

adobe photoshop - Extract individual layers from a PSD without much effort


I have to daily work with PSDs of iPhone Apps. These PSDs contains App designs like buttons, texts, background images, etc.


I have to extract images of each elements from these PSDs and convert it to PNG images.


I would like to know if there is any efficient way to extract images from PSD files.



Answer



It depends greatly on how the .psd is constructed and what you need out of it.


For example, if you've got a master layer which always remains visible. They other layers which need to be visible for some buttons, but not for others, you may find using Layer Comps to be a good solution. You can simply toggle visibility for layers, then create a new layer comp. Do this for each element. Then you can export Layer Comps as files.


If you've got a .psd with each layer being a single item you need, as mentioned the script to export layers as files may help. Or you could set up an action -- Duplicate Layer (new file), Trim, Save for Web. Then assign an F key to the action. You could then simply highlight a layer and hit the appropriate F key.


Additional information concerning an action....





  1. Option/Alt click the visibility icon next to the bottommost layer in the layers panel. It should make only that layer visible.




  2. Create new Action, assign it an F key in the new Action dialog window and start recording. action creation




  3. Save for Web (whatever settings you need).





  4. After the Save for Web hit Option/Alt ] (close bracket) on the keyboard. (this should highlight, and make visible, the next layer up)




  5. Stop recording.




  6. Click the dialog option next to the "export" step of the action. dialog option




Now, all you need do is hit the F1 key (or whatever key you assigned), hit the Enter Key, and type an image title. Then repeat - F1, Enter Type title, F1, Enter, type title, and so on until all layers are saved.



It's not perfect. But without scripting it's the best you can do. Perhaps someone can help with a script. Application scripts aren't my strong suit.


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...