Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe Illustrator rasterize Script

  • rasterize Script

  • Timur Solomon

    May 27, 2022 at 11:21 am

    Hi, 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 =;
    // = "M_"+lName;
    myDoc.rasterize(tLayer, tLayer.controlBounds, rasterizeOptions);

    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

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy