Copy link to clipboard
Copied
Hi guys!
I am trying to write a simple extend script which activates alpha mask of an imported image in InDesign.
As far as I know the only way to do it is to activate it in the place image options so I am re-placing the file again. I take the name of the alpha mask I need, but I cannot find how to activate it.
I read in the documentation about javascripting the folowing:
place (fileName:File, [showingOptions:Boolean=Boolean], withProperties:Object) , but I cannot find the construction of the Object for the withProperties value.
I guess that this withProperties object is ImageIOPreferences object so I managed to create a script with which I display the values of the object ImageIOPreferences of an already imported image, but it only displays the values, and not the names of the properties.
var Doc = app.activeDocument
var DocPics = app.selection
if (DocPics.length>0) {
for (i=0;i<DocPics.length;i++) {
if (DocPics[i].constructor.name=="Image") {
var Pic = DocPics[i]
var PicBox = Pic.parent
}
else {
var PicBox = DocPics[i]
var Pic = PicBox.images[0]
}
}
for (x in Pic.imageIOPreferences) {
txt += Pic.imageIOPreferences[x] + " ; ";
};
alert(txt)
}
Does anybody know how I can find the construction of the withProperties object so I can activate the alpha mask while placing the image?
Greetings and thanks in advance,
Denis.
Hi,
Is this not what you are looking for - https://community.adobe.com/t5/indesign/set-placed-image-alpha-channel/td-p/4983226
Malcolm
Copy link to clipboard
Copied
Hi,
Is this not what you are looking for - https://community.adobe.com/t5/indesign/set-placed-image-alpha-channel/td-p/4983226
Malcolm