Need to find if Images applied clipping path(detect Edges)

Hi Scripters,
How to find Images applied with clipping path(detect Edges) in Indesign document.
Could anybody please share a code/script with me.
Yours,
Jerome

No problem -- a document's "allGraphics" property lists all of the imported graphics in the document. Just check each of them one by one. This little script alerts you with the name:
for (img=0; img<app.activeDocument.allGraphics.length; img++)
if (app.activeDocument.allGraphics[img].clippingPath.clippingType == ClippingPathType.DETECT_EDGES)
  alert (app.activeDocument.allGraphics[img].itemLink.name);

Similar Messages

  • [AS CS2] Create a list of all items whose clipping type = detect edges

    I am creating myself a light preflight script for Indesign CS2 documents where a part of it creates a list of all the images that have had the clipping path "detect edges" applied. But I am struggling to work out how to address the clipping path settings. This is basically what I have tried:
    set BadClipping to the name of every link whose clipping type is detect edges
    display dialog "The following images have detect edges on: " & (BadClipping as string)
    Any help is greatly appreciated.

    On 8/7/08 10:43 AM, "Dylan" <[email protected]> wrote:<br /><br />> set BadClipping to the name of every link whose clipping type is detect edges<br /><br />'clipping type' isn't a property of links, so you're sunk there. You need to<br />go via graphics and the 'clipping path' property (the dictionary doesn't<br />list it for graphics for some odd reason, but all subclasses of graphic<br />support it so that's got to be a bug). 'clipping path' returns a reference<br />to the 'clipping path settings', one property of which is 'clipping type.<br /><br />So you need something like this:<br /><br />tell application "Adobe InDesign CS3"<br />    tell document 1<br />        try<br />            set BadClipping to every item of all graphics whose clipping<br />type of clipping path is detect edges<br />        on error<br />            -- none found<br />        end try<br />    end tell<br />end tell<br /><br />-- <br />Shane Stanley <[email protected]>

  • We need a script that will select clipping path for multiple images in indesign

    this is what we have, but it's not working:
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll; 
    app.doScript(resetAllClippingPathsToActiveDoc, ScriptLanguage.JAVASCRIPT, [], UndoModes.ENTIRE_SCRIPT, "Reset all Clipping Paths of the Active Document"); 
    function resetAllClippingPathsToActiveDoc(){ 
        var d=app.activeDocument; 
        var allGraphicsInDoc = d.allGraphics; 
        for(var n=0;n<allGraphicsInDoc.length;n++){ 
            if(allGraphicsInDoc[n].hasOwnProperty("clippingPath")){allGraphicsInDoc[n].clippingPath.c lippingType = ClippingPathType.PHOTOSHOP_PATH};
                allGraphicsInDoc[n].clippingPath.appliedPathName = "Path 1"; 

    this is what we have, but it's not working:
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll; 
    app.doScript(resetAllClippingPathsToActiveDoc, ScriptLanguage.JAVASCRIPT, [], UndoModes.ENTIRE_SCRIPT, "Reset all Clipping Paths of the Active Document"); 
    function resetAllClippingPathsToActiveDoc(){ 
        var d=app.activeDocument; 
        var allGraphicsInDoc = d.allGraphics; 
        for(var n=0;n<allGraphicsInDoc.length;n++){ 
            if(allGraphicsInDoc[n].hasOwnProperty("clippingPath")){allGraphicsInDoc[n].clippingPath.c lippingType = ClippingPathType.PHOTOSHOP_PATH};
                allGraphicsInDoc[n].clippingPath.appliedPathName = "Path 1"; 

  • Finding bounds of nested clipping paths...

    This topic has been touched on before, muppet & sonic have pointed me in the right direction, but I'm stuck right now....
    Seeing as how "saveMultipleArtboards = false" is broken in CS4, and scripting any kind of epsSave results in the artboard size being the bounding box, I am trying to see if I can find out if the "visible to the eye" bounds of artwork exceed the artboard size.
    I can easily find non-clipped objects hanging outside the artboard by comparing the document's visible bounds to the artboard size.
    Likewise the "visible to the eye" bounds of clipped objects :
    var docRef = app.activeDocument;
    docRef.rulerOrigin = [0,0];
    ////Get size of artboard
    var myDocsizeArray = [0,0,docRef.width,docRef.height]
    ////Check for items on page
    if(docRef.pageItems.length != 0){
    /////Find out if top item is clipping mask
    if(docRef.pageItems[0].typename == "GroupItem"){
    if(docRef.pageItems[0].pathItems[0].clipping == true){
    ////Compare its bounds to doc bounds
    var myClipArray = docRef.pageItems[0].pathItems[0].visibleBounds
    if((myClipArray[1] >  myDocsizeArray[3]) || (myClipArray[2] >  myDocsizeArray[2]) || (myClipArray[0] < 0) || (myClipArray[3] < 0)){
    alert("Outside of artboard")
    However, this doesn't work if clipping paths are part of a nested groups. Is there a way to see if a clipping path's parent group is within bounds, or parent's parent group etc. is within bounds. I need to find the topmost clipping path that trumps all the others in any nested group.
    Is that what recursive functions are for? ,,,,,,,,,,,
    Something that can keep looking in a loop within itself?  Very instrospective!
    thx

    Does this help? I use these to position and find bounds based upon what is visible.
    function getRealVisibleBounds(grp) {
         var outerBounds = [];
         for(var i = grp.pageItems.length - 1; i >= 0;i--)  {
              var bounds = [];
              if(grp.pageItems[i].typename == 'GroupItem') {
                   bounds =  getRealVisibleBounds(grp.pageItems[i]);
              else if((grp.pageItems[i].typename == 'PathItem' || grp.pageItems[i].typename == 'CompoundPathItem')
                   && (grp.pageItems[i].clipping || !grp.clipped)) {
                   bounds = grp.pageItems[i].visibleBounds;
              if (bounds.length > 0) {
                   outerBounds = maxBounds(outerBounds,bounds);
         return (outerBounds.length == 0) ? null : outerBounds;
    function maxBounds(ary1,ary2) {
         var res = [];
         if(ary1.length == 0)
              res = ary2;
         else if(ary2.length == 0)
              res = ary1;
         else {
              res[0] = Math.min(ary1[0],ary2[0]);
              res[1] = Math.max(ary1[1],ary2[1]);
              res[2] = Math.max(ary1[2],ary2[2]);
              res[3] = Math.min(ary1[3],ary2[3]);
         return res;
    function positionVisible(grp,x,y)
         var bounds = getRealVisibleBounds(grp);
         var newX = x + (grp.left - bounds[0]);
         var newY = y + (grp.top - bounds[1]);
         grp.position = [newX,newY];

  • Exporting Images and Clipping Paths

    I ran into a problem exporting images the was previously reported by Ruvan Fernando on Jan 25, 2006, but nobody had responded, so I'm trying again...
    I'm using the SDK to open images and then save them back out with different colorspaces, resolution, etc. When I have an image that has a clipping path in it, when it's saved, the clipping path is missing.
    I am copying all the source image attributes to the destination image attributes.
    Any help would be appreciated.

    I tried dragging it, and it gave the original version.
    At Share there are; Print, Email, Desktop, HomePage, .Mac Slides, Order prints, Send to iDVD, Burn Disk, Export
    I tried Desktop and it put the current image do my wallpaper.

  • Trouble with Photoshop CS5.1 eps images with clipping path placed in FHMX

    Photoshop CS5 eps files, clearcut with clipping paths now show a black box instead of a transparent background when placing in Freehand MX.
    Tiff files with clipping paths work OK but look ugly and make Freehand redraw the screen all the time, thus slowing down my work.
    The eps file placed in InDesign CS5.5 is OK
    Anybody knows a work-around? I', doing most of my work in Freehand

    Photoshop CS5 eps files, clearcut with clipping paths now show a black box instead of a transparent background when placing in Freehand MX.
    Tiff files with clipping paths work OK but look ugly and make Freehand redraw the screen all the time, thus slowing down my work.
    The eps file placed in InDesign CS5.5 is OK
    Anybody knows a work-around? I', doing most of my work in Freehand

  • Tiff images lose clipping path during export

    Hello,
    I've imported some tiff with embedded clipping paths from photoshop to lightroom. After an export these paths are missing in the tiffs. Is there a possibility to retain the paths in the tiffs?
    regards, frank
    using lightroom-1.4.1/macos

    Unfortunatelly, LR doesn't work with layers or sellections done in PS.<br /><br /><br /><[email protected]> wrote in message <br />news:[email protected]..<br />> Hello,<br />><br />> I've imported some tiff with embedded clipping paths from photoshop to <br />> lightroom. After an export these paths are missing in the tiffs. Is there <br />> a possibility to retain the paths in the tiffs?<br />><br />> regards, frank<br />><br />> using lightroom-1.4.1/macos

  • Need help finding moved image files

    How would I find files after they have been moved? I travel and use a MB Pro laptop. The workflow I'm using is to download images to my desktop, review, rate and add keywords immediately. I make 2 backups, 1 to portable data store hard drive and one to DVD. Then every few days I erase the desktop image files. When I arrive home I download the entire trip's images from the portable storage to my desktop drives (2 500Gb SATA drives).
    Is there an easy way to direct Aperture to look for the files in the new location? Or, failing that, is there a better way to work? I regularly have 40 - 60 Gb of images after a trip and the laptop hard drive is inadequate for the task.

    The question isn't really clear to me yet. If you know what "the new location" is, then it's easy to make Aperture point to it. But that may not be the question. I think you may need to describe your workflow in more detail.
    You don't say how to review etc images on the MBP. If you're using Aperture, it must be with a library. Are you using Managed images there? So is the problem how to transfer data -- images and edits and metadata -- from the library on the MBP to the library (with referenced images??) on the desktop?
    Synchronizing libraries is not something Apple makes easy or offers any real help with. The best way to do it turns out to be to export one project at a time, connect to the other machine and its library, and import the projects. (In the process you might also Relocate images to make them referenced.)
    But your note about the laptop drive being to small is confusing. I don't see where your images are when you're on the road.

  • CS4: crash with right-click on image with clipping path!

    I have a placed image. It is TIFF and has aPhotoshop Path. The path is not on when placed. Then I select the TIFF image and choose clipping > options.
    I select the Photoshop path.
    Now I want to change the path to a frame so I right-click on the image...
    Everytime in Mac OS X 10.5.5 the beachball cursor and I crash!

    EWh...no, it was NOT a faceless apllication. It had to do with a corrupted preference! Has to do with the 'Edit with' list, see also this post:
    F vd Geest (aka. Wa veghel), "CS4 crash on 'Edit with' how to solve?" #, 24 Dec 2008 9:31 am

  • Lost my X6 need to find my images in nokia suites ...

    I can not get my images in my ovistore or nokia suites please help.

    Did you ever Sync these images with Nokia Suite ? If 'Yes', aren't they visible in 'Gallery' ?
    Else, Open Nokia Suite-->Tools-->Options-->Gallery-->..and see the Folder Location for 'Photos'.. Then in Windows explorer search for this folder and check if the Images are there ...

  • Cutting out images in indesign, clipping path problems

    Hi,
    I have been putting images of my drawings from photoshop onto indesign for my portfolio,  after looking around the only way I can seem to find to cut them out is using clipping path/detect edges.
    The problem I have is because they are scanned sketches this method produces really inacurate and shoddy results and no matter how much I play around with the threshold and tollerance this means I still have to mess around with the pen and arrow tool for ages on each image.
    Is there a quicker solution to cutting them out like the magic wand or lasoo tool on indesign?
    It has taken days now in in design , I have all the images already cut out from their original pages on photoshop but the white box always comes around again when I drag or place the images in indesign.
    I have been shorcutting some pages and doing layout on photoshop and placing the image behind which works fine sometimes but is really inconviiant when I want to move the layout around text ot anything...... i have attatched some pictures to show you what I mean.
    Thanks for your help in advance
    Leo

    Well Thats 2 days of my life Ill never get back!
    Thankyou very much! cant belive I was that stupid

  • CS2 clipping paths incompatible with CS3 indesign

    Hi there
    I need to use photoshop images with clipping paths that were created in photoshop CS2 in a indesign CS3 doc (working on a mac OS X 10.5.4). I import the image ok, the trouble is every time I try to activate the clipping path I get the spinning wheel of doom and the application stops responding.
    The image opens up fine in CS3 photoshop, there only seems to be a problem with the path itself which I've tried copying onto other images which I know work and it does the same thing with them.
    I used the image in indesign CS2 as a test and it worked properly, which is why I think the 2 packages are incompatible.... oddly enough, I'm using some really old images which were created before CS was a glint in the milkmans eye and they work perfectly.
    Does anybody know a way around this, or indeed if this is a bug or something?
    Thanks

    It is a bug but Adobe fixed it.
    If you want to use EPS files with clipping paths, that is fine, but be aware that there were problems that InDesign recovered from about 2 years ago. I wrestled through that time with many problems with clipping and have lots of documentation I never want to drag out again.
    The thing is to have everything updated. Files that were saved will not be fixed by copying paths, you need to re-save the files in an up-to-date version of Photoshop by doing 'save as' to overwrite.
    Sorry you're having this problem, it stinks but was remedied in updates. Try one file that you know doesn't work and do the save-as to see if that fixes it. Open and save in the latest CS3 version of course.
    Get rid of your CS2 InDesign. Use CS3 only.

  • Embed clipping path without embedding image

    I embed Photoshop images all the time in order to get a vectorized version of the clipping path. Afterwards, I relink the image I just embedded and the new vector becomes the mask. It would be nice if I didn't have to embed the image itself in order to embed the clipping path. Even better, it would be nice to see which images had clipping paths right inside of Illustrator without having to embed them or open Photoshop. Maybe this could be part of the "Link Info"?

    Could you just export the path for the clipping path from Photoshop to Illustrator?
    You know export paths to Illustrator under the file menu in Photoshop? Or just drag the path from Photoshop to the Illustrator document?
    Oh I see what you want you want to link the file with the option to have the clipping mask be a live editable clipping mask in AI and in the same relative position.
    Interesting option, like a check box link file embed clipping mask.

  • How do I transform a clipping path and layer at same time?

    I have a bunch of images with clipping paths that need to be altered. Most images need skewed or distorted, and I can't figure out how to transform the path at the same time I transform the layer - so I do not have to create new paths. Thanks
    Working in Photoshop CS2

    I’m afraid You will have to employ a workaround.
    I would recommend applying the Path as a Vector Mask to the Layer (with the Path selected command-click on the Add Layer Mask-button in the Layers-panel), then transforming, subsequently duplicating the Vector Mask and removing it from the Layer.
    Or copy-paste it into the existing Clipping Path and then remove it.
    Some part of the procedure may be automate-able with Actions or Scripts and hopefully it will still save at least some time.

  • Clipping paths to varnish layer

    I'm trying to use an applescript that I found for CS2 to copy all images to a varnish layer, apply clipping path, convert to frame, delete image and then fill with color. I will also need to add a stroke and set the object to multiply. I'm thinking it will be better to do that with an object style. I'll put the original script below. I changed CS2 to CS5 but the only result I get is the new layer. Any help would be greatly appreciated.
    tell application "Adobe InDesign CS2"
    set myDoc to active document
    tell myDoc
    try
    make layer with properties {name:"Varnish"}
    end try
    set theLinks to every link
    repeat with i from 1 to count of theLinks
    set parentID to id of parent of item i of theLinks
    set oldPath to clipping path of image id parentID
    if the clipping type of oldPath is photoshop path then
    set oldGraphic to parent of item i of theLinks
    set newGraphic to duplicate oldGraphic
    set properties of newGraphic to {item layer:"Varnish"}
    set newpath to clipping path of graphic 1 of newGraphic
    tell newpath
    set convertPath to convert to frame
    end tell
    set properties of convertPath to {fill color:"Magenta"}
    delete graphic 1 of convertPath
    end if
    end repeat
    end tell
    end tell

    I also found a javascript that works on selected images. It might be better to just loop that through all the images, but I'm not sure how.
    Thanks!
    if(app.selection.length == 1){
        mySel = app.selection[0];
        try{myClipping = mySel.graphics[0].clippingPath;
            if(myClipping.clippingType == ClippingPathType.ALPHA_CHANNEL ||
                myClipping.clippingType == ClippingPathType.PHOTOSHOP_PATH){
                    alert("Clipping path name: " + mySel.graphics[0].clippingPath.appliedPathName);
            myFrame = mySel.duplicate(undefined,[0,0]);
            myFrame.graphics[0].clippingPath.convertToFrame();
            myFrame.graphics[0].remove();
            myFrame.fillColor = app.activeDocument.swatches.item("Registration");
            myFrame.select();
        catch(e){alert("There is no clipping path applied!");}

Maybe you are looking for

  • Java plugin not working on any browser (64-bit system)

    Hi there! I'm having a major problem with running Java plugin on all of my browsers (Opera, Chromium and Firefox) under my Arch Linux 64-bit system. The system is fully up-to-date, and Java plugin is being displayed among other plugins on "about:plug

  • How many playlists can you have in iTunes

    How many playlists (folders) can you have in iTunes. I have a lot of music in iTunes and would like sort them out so it is easier for me to use Eg 1 x folder for now 83 1 x folder for now 82 1 x folder for mash ups Then weekly folders so probably loo

  • Please help me to create the BAPI

    I AM CREATING CUSTOM BAPI  IN sap BOR. IN THE FUNCTION MODULE I HAVE USED ONE ITERNAL TABLE AND ONE WORK AREA. I HAVE CREATED THE STRUCTURE OF THE ITAB ASSOCIATED WITH THE FUNC MODULE. dO I NEED TO CREATE THE STRUCTURE OF THAT WORKAREA ALSO ? IF SO 

  • What is the cost to terminate service on a line?

    I have three phones on my family share plan and 1 of the users wants to cancel her service. Her contract end date is 03/11/2013. It has previously been renewed. How much would the early termination fee be? Thnaks

  • [46TL868G] DLNA Media Player Playlist not updating

    Hello guys, I was wondering - I set up my Network Media Player correctly, and am already able to stream files. However, somehow the list of files does not update itself, e.g. after renaming a file - it still shows the old name despite resetting my Wi