Skip to main content
TᴀW
Legend
November 17, 2009
Question

Set all placed Photoshop images in bitmap mode to overprint? IDCS4

  • November 17, 2009
  • 1 reply
  • 2904 views

Hello,

Is there anyone familiar with the object model well enough to be able to help me with the following easily:

I need to go through all the placed images in the activeDocument. If the image is a Photoshop document in bitmap mode (1-bit mode), it needs to have it's Fill set to overprint (UI would be: Attributes Palette>Overprint Fill).

Any help would be much appreciated.

Thank you,

Ariel

This topic has been closed for replies.

1 reply

TᴀW
TᴀWAuthor
Legend
November 17, 2009

okay, here's where I am now:

mydoc= app.activeDocument.allGraphics[0].imageTypeName

This returns "Photoshop" if it's a Photoshop placed image. But, how do I figure out if it's in bitmap mode?

TᴀW
TᴀWAuthor
Legend
November 17, 2009

As this is urgent for me, I'm posting my slow progress, but if anyone can speed things up for me it really would be soo helpful!

okay, in the UI Info palette there is an entry called: Color Space. If the image is bitmap, this shows "Black and White". How do I access this in the object model? Color Space does not seem to be a property of graphic.

Community Expert
November 18, 2009

Hi, Ariel!
Try something like this (a bitmap TIFF image is selected):

if (app.selection[0].allGraphics[0].properties.toSource().match(/space:"Schwarzweiß"/g)=="space:\"Schwarzweiß\""){
    app.selection[0].fillColor="Yellow";
    };

Since I'm working with an german version of InDesign the space-property for an bitmap TIFF image is "Schwarzweiß". So figure out what the ESTK exactly tells you when you check with the properties.toSource()-method. It might be: match(/space:"bitmap"/g) which translates to:

if (app.selection[0].allGraphics[0].properties.toSource().match(/space:"bitmap"/g)=="space:\"bitmap\""){
     app.selection[0].fillColor="Yellow";
     };

Uwe


Of course you need something like this:

if (app.selection[0].allGraphics[0].properties.toSource().match(/space:"Schwarzweiß"/g)=="space:\"Schwarzweiß\""){

    app.selection[0].allGraphics[0].overprintFill=true; };

The fillColor="Yellow" was for testing only.

Uwe