Resizing layers at export
hello,
i've modified script export layers of ai file individual jpg files, need resize them fit within 125x96. ai file composed of 'squarish' icons in grid, spread across canvas. here part of script i'm sure source of trouble:
var hscaleamount = 125 / document.width;
var vscaleamount = 96 / document.height;
options.horizontalscale = hscaleamount * 100;
options.verticalscale = vscaleamount * 100;
using above outputs files 17px x 15px...
any appreciated!
thanks,
rob
ps realise i'll end changing aspect ratio, plan write more code figure out if landscape/portrait , resize accordingly.
hi,
your formula right, souspicious shape (your icon) smaller artboard.
add (if want keep blank part arround shape):
options.artboardclipping = true ;
or calculate scaleamount shape , not document size.
regards, art.chrome
More discussions in Illustrator Scripting
adobe
Comments
Post a Comment