3 Replies Latest reply on Sep 24, 2014 5:55 PM by chudomozg

    Can't rasterize object with hole inside

    chudomozg

      Hello everyone.

      I've used thisone part of script for rastering objects.

       

      var docPathItems = app.activeDocument.pathItems;
      var myDoc = app.activeDocument;
      // If a docuement is open
      if ( app.documents.length > 0 )
      {
        for ( var i=0; i < docPathItems.length ; i++ )
        {
        if (docPathItems[i].filled == true)
        {
        var rasterizeOptions = new RasterizeOptions;
        rasterizeOptions.antiAliasingMethod = AntiAliasingMethod.ARTOPTIMIZED;
        rasterizeOptions.backgroundBlack = false;
        rasterizeOptions.clippingMask = true;
        //rasterizeOptions.colorModel = RasterizationColorModel.GRAYSCALE;
        rasterizeOptions.convertSpotColors = false;
        rasterizeOptions.convertTextToOutlines = false;
        rasterizeOptions.includeLayers = false;
        rasterizeOptions.padding = 0;
        rasterizeOptions.resolution = 300;
        rasterizeOptions.transparency = true;
        myDoc.rasterize(docPathItems[i], docPathItems[i].controlBounds,rasterizeOptions);
        }
        }
      }
      

       

      If object dont have hole inside (for example picture). It work ok.

      Screenshot_2.png

      BUT if its hole inside (for example picture) - I have error.

      Screenshot_3.png

       

      So.. error 

      Screenshot_4.png

      Screenshot_5.png

       

       

      Who know what does it mean???