[ExtendScript] Rasterizing group creates two rasterItems
- MacOS 15.2.
- Adobe Illustrator 29.1
- Open demo document (attached) and run script (below).
- Should create one RasterItem, but instead creates two.
Test Script (for use on attached test file):
(function () {
var doc = app.activeDocument;
var item = doc.groupItems[0];
// Raster Options
var rasterOpts = new RasterizeOptions;
rasterOpts.resolution = 192;
rasterOpts.antiAliasingMethod = AntiAliasingMethod.None;
rasterOpts.backgroundBlack = false;
rasterOpts.clippingMask = false;
rasterOpts.colorModel = RasterizationColorModel.DEFAULTCOLORMODEL;
rasterOpts.convertTextToOutlines = false;
rasterOpts.includeLayers = false;
rasterOpts.padding = 0;
rasterOpts.transparency = false;
rasterOpts.convertSpotColors = true;
doc.rasterize(item, item.geometricBounds, rasterOpts);
var count = doc.rasterItems.length;
if (count > 1)
alert('The rasterization created two images but should have created only one.');
})();
See also this forum post.
Edit: Note that the resolution (greater than 191) and the exact position of the group's path items makes a difference.
4
votes
m1b
shared this idea
-
Same happens on Windows 10 using the latest Beta 29.3.0.67.
The top image is a large transparent one. -
Sergey Osokin commented
I confirm the rasterization problem on MacOS Monterey + AI v29.1. I did not have this problem with AI v29.0.1.