Activity › Forums › Adobe Illustrator › rasterize Script
-
Timur Solomon
May 27, 2022 at 11:21 amHi, I’m trying to write a script to rasterize images with a clipping mask.
But, I get, not the same image as if I did it through the program menu.The image has different dimensions. What am I not considering?
var myDoc = app.activeDocument;
var rasterizeOptions = new RasterizeOptions();
//rasterizeOptions.includeLayers = true;
rasterizeOptions.transparency = true;
for (i = myDoc.groupItems.length-1; 0<=i; i -- ){
var tLayer = myDoc.groupItems[i];
var lName = tLayer.layer.name;
//tLayer.layer.name = "M_"+lName;
myDoc.rasterize(tLayer, tLayer.controlBounds, rasterizeOptions);
};
alert("Ok");As you can see in the image, the results of the program, the frames are crisp for the size of the image. Right part image
The script takes into account the size of the image and goes beyond the mask. How to avoid it?
Viewing 1 of 1 posts
Reply to this Discussion! Login or Sign Up
Log in to reply.