Resizing PNG with Pixel values; Save as artboard name and pixel value


hello,

first off, have never written javascript before , attempting to.  have been reading mad wrap head around extendscript toolkit (estk) in cs6.  see awesome potential concerned idea may not possible.  that's why thought ask experts here.

 

i have client needs cursors , icons apps saved out in multiple, transparent png sizes , output filename needs reflect name. example, have 2 square artboards, 1 contains red car, other contains same car in green, , want save both of 96x96 pixels, 72 x72 pixels, 48x48, 36x36, , 24x24 (5 different sizes).  naming scheme taken artboard name (car_red, car_green) , pixel value of each size, final name "car_red_0096x96.png", "car_red_0072x72.png", etc., etc.

 

the first thing noticed there seems no saveforweb object in estk.  discovered exportoptionspng24 nice, seems give sizing property based on percent (horizontalscale, or verticalscale).  use script make size artboard exact pixel dimensions need, , percentage scaling property not allow this, there way enter in pixel values , not percentage scale values?

 

this of course leads me next question: hoping script to, @ press of button, export selected artboard 5 sizes, naming scheme uses artbaord name prefix , pixel size suffix.  hoping use pixel value in code apply suffix

 

is of possible?

 

gratefully,

dave

yes script can multi-saves or exports plus can concat name strings goes… ai exports @ 72dpi need script little math calculate scale percentages h&v go…



More discussions in Illustrator Scripting


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support