Trying to verify that there is in fact a bug in the most recent release of Photoshop (version 16.1.2). Not exhibiting this behavior in 16.0.1 or 15.2.2 on a mac.
This is the version from system info that is exhibiting the bug.
Adobe Photoshop Version: 2015.1.2 20160113.r.355 2016/01/13:23:59:59 CL 1059143 x64
Most of our scripts do not behave properly in version 16.1.2. I believe that this is limited to a bug using the fill method. Seems intermittent (sometimes it will fill with the proper color sometimes not). I tried to strip some script logic down to the bare minimum for what would exhibit the buggy behavior. This is script that builds a multichannel document with 2 new spot channels (one with a square in the upper left ("Box1"), one with a square in the lower right ("Box2") overlapping the other). The result of the script should finally create an alpha channel that represents the region where the "Box1" & "Box2" channels intersect, resulting in a 500 pixel centered square.
var newImage = app.documents.add(1000, 1000, 72, "bug.tif", NewDocumentMode.GRAYSCALE, DocumentFill.WHITE);
var docRef = app.activeDocument;
var rgbWhite = new SolidColor ();
rgbWhite.rgb.red = 255;
rgbWhite.rgb.green = 255;
rgbWhite.rgb.blue = 255;
var rgbBlack = new SolidColor ();
rgbBlack.rgb.red = 0;
rgbBlack.rgb.green = 0;
rgbBlack.rgb.blue = 0;
var box1Channel = docRef.channels.add();
box1Channel.kind = ChannelType.SPOTCOLOR;
box1Channel.name = "Box1";
var box1Region = Array(Array(0,0), Array(0, 750), Array(750, 750), Array(750, 0));
var box2Channel = docRef.channels.add();
box2Channel.kind = ChannelType.SPOTCOLOR;
box2Channel.name = "Box2";
var box2Region = Array(Array(250,250), Array(250, 1000), Array(1000, 1000), Array(1000, 250));
var alphaChannel = docRef.channels.add();
alphaChannel.name = "WhereBoxesIntersect";
var box1Selection = docRef.channels.getByName("Box1");
var box2Selection = docRef.channels.getByName("Box2");
I've noticed that when using this script upon first launch of this version of photoshop (16.1.2) the script doesn't fill any of the channels with black. See image below. Note the lack of black region fills in the spot and alpha channels.
Any subsequent launches of the script on the other hand do seem to behave properly in version 16.1.2. Strange. In the context of most of our scripts though I can only say that the selection.fill method behavior is intermittent and inconsistent at best. Below is the expected behavior in version 15.2.2 and subsequent launches in 16.1.2. Note the black region fills in the spot and alpha channels.
Hopefully this can be confirmed and remedied with a patch going forward as it impacts our workflows. Thanks in advance for your time. Let me know how I can better elaborate.
Be the first to post a reply!