Copy link to clipboard
Copied
This has been puzzling me recently:
It seems this issue relates to resolution size, as scaling the group down requires an even higher dpi for the problem to manifest.
You can replicate the issue by downloading my document. The script below will prompt you for a dpi value upon launch.
https://shared-assets.adobe.com/link/714aaccc-b774-47cd-48b8-43a24f04e870
function rastr() {
var doc = app.activeDocument;
var docLayers = doc.layers;
var item = docLayers[0].groupItems[0];
// 191 works. 192 creates two image objects for some reason?
var rasterResolution = prompt("Raster Resolution:", "");
// Raster Options
var rasterOpts = new RasterizeOptions;
rasterOpts.resolution = parseInt(rasterResolution);
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);
}
rastr();
Hi @iLLMonkey I can confirm your finding on AI 29.1 MacOS 15.2. It creates two images; one is just empty transparent pixels.
I will file a bug report. Also I've simplified the demo document (attached) to just two ordinary rectangles and modified your test code slightly just to be more targeted.
- Mark
(function () {
var doc = app.activeDocument;
var item = doc.groupItems[0];
// Raster Options
var rasterOpts = new RasterizeOptions;
rasterOpts.resolution = 192;
rast
...
I have lodged a bug report. Please vote to have it fixed.
Copy link to clipboard
Copied
Hi @iLLMonkey I can confirm your finding on AI 29.1 MacOS 15.2. It creates two images; one is just empty transparent pixels.
I will file a bug report. Also I've simplified the demo document (attached) to just two ordinary rectangles and modified your test code slightly just to be more targeted.
- Mark
(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.');
})();
Copy link to clipboard
Copied
I have lodged a bug report. Please vote to have it fixed.