Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Need help rewriting a Android Asset Export Script

$
0
0

Hello,

 

im in the process of exporting tons of Assets (mainly Icons) for Android in various resolutions (xxhdpi,xhdpi...)

 

I stumbled upon a great script by Gaston Figueroa (Blog | Export to Android Photoshop Script | Uncorked Studios) which seems to work fine.

 

The script works the following way:

  • it gets the active layer size
  • it resizes the active layer
  • it creates a new temp document with the dimensions of the new width and height
  • saves the asset as png

 

Here is the script: /*! * Android Assets for Photoshop * ============================= * * V - Pastebin.com

 

The problem is, that it trims the canvas around the icon (which is transparent in my case) and just resizes the layer (the icon itself).

I need it to resize the whole canvas WITH the transparent space around the layer.

 

I am very new to this whole Photoshop scripting thing and would appreciate some help of you experts :-)

 

Regards


Viewing all articles
Browse latest Browse all 27456


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>