Clipping Path Script from lowres to hires

Hello all. I am trying to find out if there is a script that can transfer a clipping path from a low resolution to a high resolution image. Perhaps from one folder of low res images to another folder of high resolution images of the same file name.
Does anyone know of anything out there that can do this?
Love to know.
Thanks in advance!

//This will copy all the paths from one document to another.
#target photoshop
app.bringToFront;
var doc = app.documents[0];
var doc2 = app.documents[1];
activeDocument = doc;
for( var q =0; q< doc.pathItems.length; q++ ) {
copyPath( doc, doc2, doc.pathItems[q].name );
activeDocument = doc;
function copyPath( From, To, PathName){
// Select source document
activeDocument = From;
// define function
cTID = function(s) { return app.charIDToTypeID(s); };
// Select path
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putName( cTID( "Path" ), PathName);
desc.putReference( cTID( "null" ), ref );
executeAction( cTID( "slct" ), desc, DialogModes.NO );
// Copy path
executeAction( cTID( "copy" ), undefined, DialogModes.NO );
// Select destination document
activeDocument = To;
// Paste path
executeAction( cTID( "past" ), undefined, DialogModes.NO );
// Deselect path
desc.putReference( cTID( "null" ), ref );
executeAction( cTID( "Dslc" ), desc, DialogModes.NO );

Similar Messages

  • Why clipping path postponed from a photoshop in indesign at operation of addition of the new channel by means of work path doesn't work

    why clipping path postponed from a photoshop in indesign at operation of addition of the new channel by means of work path doesn't work 

    Please elaborate the issue and Supply pertinent information for quicker answers:
    The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
    Adobe product and version number
    Operating system and version number
    The full text of any error message(s)
    What you were doing when the problem occurred
    Screenshots of the problem
    Computer hardware, such as CPU; GPU; amount of RAM; etc.

  • Clipping paths removed from IDCS6

    I've noticed that clipping paths are no longer part of IDCS6. There is a menu under "Objects" that says "Clipping Path", but the sub-menus under it are grayed out. Even when I try to create a clipping path the same way I've always done. I have a photograph in a round frame and I want to clip it with a rectangle so that the bottom and the right side are flat. Pretty simple stuff. Can anyone help? Please do not tell me where the menu commands are. I've already tried that. I must need to do something else. Of course, it is different from how AI works, but that is to be expected from a group of applications that have absolutely nothing in common. Thanks in advance for any help.
    Mike B
    IDCS6
    OS 10.8.2

    To see clippin gpath options you'd need to have the image frame or the image selected, but from your desription I don't think you really want to use a clipping path (where your options are to detect edges, use a Photoshop path, or an alpha channel).
    Instead, draw the rectangle you want to use to clip the oval frame and positionit as you want it, then move it behind the oval and select both. Open the Pathfinder panel and click the Intersect button.
    Or for more flexibilty cut the oval frame and "Paste Into" the rectangle and you can move it around to change the masking any way you like.

  • Clipping path script

    Hi all,
    I would like to know if there is a script solution that automatticly aplies a clipping path throughout the whole document instead of selection each container by hand and choose Path 1.
    Thanks
    Phillip

    Thanks Kasyan,
    But i had a syntax error on yours. But in the topic i used the following script. It does what is need to do but Indesign crashes. Do you got any idea?
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    app.doScript(resetAllClippingPathsToNone, ScriptLanguage.JAVASCRIPT, [], UndoModes.ENTIRE_SCRIPT, "Reset all Clipping Paths of all open Documents to None");
    function resetAllClippingPathsToNone(){
    var allOpenDocs = app.documents;
    for(var m=0;m<allOpenDocs.length;m++){
            var d=allOpenDocs[m];
            var linksIDs = d.links.everyItem().id;
            for(var n=0;n<linksIDs.length;n++){
                try{
                    d.links.itemByID(linksIDs[n]).parent.parent.graphics[0].clippingPath.clippingType = ClippingPathType.PHOTOSHOP_PATH;
                }catch(e){};

  • Make a clipping Path while retaining it's appearance - script

    This has been a long standing wish of mine, and I've devised this script that "kind of" works.
    This script takes your selection, copies appearance attributes, and pastes them to the top object after clipping.
    It's currently limited in a few ways:
    • It does not accept compound paths as clipping object (and I don't know how to test for it, nor how to iterate down said compound clipping object to set each path object to clipping separately)
    • It only works with a single stroke or fill
    • It does not understand "no fill" it will fill your object with white instead *FIXED*
    • I'm hoping to use the "graphicStyle" property to copy the appearance, since that sounds way cleaner. But I don't understand how to.
    Even with these limitations, I bound this to CMD+7 using fastscripts - I'm *already* used to it working this way!
    Carlos Santos, thank you for writing the base of what became this script
    I'd be much obliged if anyone can help me out with any of those limitations / wishes.
    #target Illustrator
    //  script.name = Clip Retaining Color.jsx;
    //  script.required = at least two paths selected, top most path is the clipping mask;
    //  script.parent = Herman van Boeijen, www.nimbling.com // 30/11/13;
    //  *** LIMITED TO A SINGLE STROKE AND/OR FILL OF THE CLIPPING OBJECT***
    //  Here's hoping to use the "graphicStyles" property to copy over the appearance.
    if ( app.documents.length > 0 ) {
        idoc = app.activeDocument;
    }else{
        Window.alert("You must open at least one document.");
    var idoc = app.activeDocument; // get active document;
    var sel = idoc.selection; // get selection
    var selectedobjects = sel.length;
    function ClipRetainingColour(idoc){
        var lay = activeDocument.activeLayer
        if(lay.locked || !lay.visible){
            alert("Please select objects on an unlocked and visible layer,\nthen run this script again.");
            return;
        var igroup = lay.groupItems.add(); // add a group that will be the clipping mask group
        var imask = sel[0]; // the mask is the object on top
        var clipcolors = [];
        //copy appearance
        if(imask.filled)     {clipcolors.fillColor = imask.fillColor;}
        if(imask.stroked)    {
            clipcolors.stroked = imask.stroked;
            clipcolors.strokeWidth = imask.strokeWidth;
            clipcolors.strokeColor = imask.strokeColor;
        for (var i = selectedobjects-1 ; i > 0 ; i--){
            var ipath = sel[i];
            ipath.move(igroup, ElementPlacement.PLACEATBEGINNING);
        imask.move (igroup, ElementPlacement.PLACEATBEGINNING);
        //enable clipping
        igroup.clipped = true;
        imask.clipping = true;
        //paste appearance
        if(clipcolors.fillColor)    {imask.fillColor = clipcolors.fillColor;}
        if(clipcolors.stroked)      {
            imask.stroked = clipcolors.stroked;
            imask.strokeWidth = clipcolors.strokeWidth;
            imask.strokeColor = clipcolors.strokeColor;
    if (selectedobjects){
        ClipRetainingColour(idoc);

    *FIXED IT* - it's working!
    I bound this to CMD+7 using the excellent Fastscripts
    My clipping paths will be so much more colorful from now on!
    Yay!
    #target Illustrator
    #targetengine main
    //  script.name = Clip Retaining Color.jsx;
    //  script.required = at least two paths selected, top most path is the clipping mask;
    //  script.parent = Herman van Boeijen, www.nimbling.com // 07/12/13;
    //  *** LIMITED TO A SINGLE STROKE AND/OR FILL OF THE CLIPPING OBJECT***
    //  Big thanks to CarlosCanto and MuppetMark on the Adobe Illustrator Scripting Forums, and my pal Niels Bom for showing me the debugger (...)
    if ( app.documents.length > 0 ) {
        var curDoc = app.activeDocument;
    }else{
        Window.alert("You must open at least one document.");
    var sel = curDoc.selection; // get selection
    var selectedobjects = sel.length;
    var clipobject = sel[0]; // the mask is the object on top
    var clipcolors = [];
    //var pathItems = [];
    var container = curDoc.activeLayer;
    //Only if there are objects selected
    if (selectedobjects){
        if(container.locked || !container.visible){
            alert("Please select objects on an unlocked and visible layer,\nthen run this script again.");
        }else{
        ClipRetCol(curDoc);
    function ClipRetCol(curDoc){
        //IF COMPOUND CLIPPING PATH
            if (clipobject.typename === "CompoundPathItem") {
                //copy appearance
                sel = curDoc.selection;
                clipobject = sel[0].pathItems[0];
                CopyAppearance(clipobject);
                //MAKEMASK
                app.executeMenuCommand ('makeMask');
                //Since making the clipping path changed the selection, set variable for selection again
                sel = curDoc.selection;
                clipobject = sel[0];
                clipobject = clipobject.pageItems[0].pathItems[1];
                PasteAppearance(clipobject);
        //IF REGULAR PATH
            else {
                //copy appearance
                CopyAppearance(clipobject);
                //MAKEMASK
                app.executeMenuCommand ('makeMask');
                //paste appearance
                PasteAppearance(clipobject);
    }//ClipRetCol END
    function CopyAppearance(clipobject) {
                if(clipobject.filled)  {
                    clipcolors.fillColor = clipobject.fillColor;}
                if(clipobject.stroked) {
                    clipcolors.stroked = clipobject.stroked;
                    clipcolors.strokeWidth = clipobject.strokeWidth;
                    clipcolors.strokeColor = clipobject.strokeColor;}
    }//CopyAppearance END
    function PasteAppearance(clipobject) {
                if(clipcolors.fillColor)    {
                    clipobject.fillColor = clipcolors.fillColor;}
                if(clipcolors.stroked)      {
                    clipobject.stroked = clipcolors.stroked;
                    clipobject.strokeWidth = clipcolors.strokeWidth;
                    clipobject.strokeColor = clipcolors.strokeColor;}
    }//PasteAppearance END

  • Clipping paths from magic wand selection

    I've been looking through dozens of tutorials but even the one's that mention this they all assume you know how to do it. All I would like to do is turn a selection made using either the magic wand tool or the other selection tools/methods and turn that into a clipping path.
    This is the selection i've made with the magic wand tool:
    http://img414.imageshack.us/img414/9307/screen28qd.jpg
    Also is their any way to turn a whole layers contents into clipping paths? For example I have that image on it's own layer with no background, could I turn everything on that layer into a clipping path?
    Clipping paths for this kind of thing as far as i'm aware is the only way to import images into quarkxpress with no backgrounds.
    thanks
    sam

    Hey Sam, if I'm not mistaken you simply have to make your selection, then select make "work path" from the Path window, next you save the path and then select "clipping path" from the Path window and select the saved path's name.
    I would think this would work with layer selections as well.
    Hope this helps...
    Dan

  • How do I keep my clipping path from shifting positions when I crop an image? [was: Question]

    How do I keep my clipping path from shifting postitions when I crop an image?

    The work path will remain positioned relative to the same underlying pixels after a crop.  Are you trying to position it relative to one or more image edges after cropping?  I don't think you can do that without moving the workpath after the crop.

  • Eps into flash8 from Freehand ignores clipping path

    Hi,
    Flash8 is seeing vector lines beyond the clipping path when
    its exported as an eps from Freehand9 or MX.
    I have a map with roads etc drawn in FH9, I have placed a box
    over that part of the map I wish to export as eps and cut contents
    then paste inside box. I now see just the map within the box.
    Export as eps. (I do this all the time). Open it into photoshop, it
    sees just out as far as the box border. No problem
    However File >Import to Library in Flash 8 , then drag
    drop to stage, sees all the artwork outside of the box, stuff I
    don't want. No difference if exported as eps from MX. Trimming
    hundreds of roads etc down to the edge of the box is impractical
    for every eps I need to make, as I need to export each bus route on
    the map as a separate eps, and there are many !
    Envirographics

    > I saved a Photoshop EPS CYMK image with a clipping path.
    It imports into Adobe
    > InDesign CS, but not into Freehand. All I get is a white
    box.
    > I just read here that Freehand will not accept EPS
    files. How else to get the
    > PS clipping path file into a FH document?
    FreeHand will import eps images but while ID can read the
    file and show it on screen FH can only use preview image i.e. low
    resolution version of the image embedded in eps file. Otherwise FH
    will show only the white box. It can be printed with PS printer or
    exported as pdf but placing is of course difficult.
    So you must save the eps with preview. But, the preview is
    not necessarily 'clipped' and all the transparend areas have opaque
    color. As memory serves FH support clipping paths in tiff files and
    clipping is visible but there may be problems in printing.
    You can also export the clipping path as Illustrator file,
    import into FreeHand and paste a non clipped tiff image into it.
    Using clipping paths is somewhat outdated now just as
    FreeHand is.
    I just finnished a book project which included removing
    background from about 150 images. I used Photoshop mask layers and
    imported images into InDesign as cmyk photoshop files. Since the
    layer mask is a grayscale image edges can be fathered and the
    result is way better than with a clipping path. In fact some of the
    images had cliping paths but I converted them all into selections
    and feathered layer masks.
    Also some of the objects had quite shallow depth of field and
    some areas were blurred. Removing background with clipping path
    would have looked awful but I just used more feathering in these
    areas the result was in fact very good.
    Ability to use layered psd files is one of the reasons why I
    quit using FreeHand and use Illustrator (and InDesign) now.
    Jukka

  • Create clipping path from selection

    I'm driving crazy!
    Why this script does not work?
    tell application "Adobe Photoshop CS3"
    tell current document
    make work path selection
    make clipping path (path item 1) flatness 0.5
    end tell
    end tell
    The work path is created with no prob.
    But the clipping one returns this error:
    "The command »Define« is not avalaible"
    What's wrong?

    I've found the solution!
    You have to name the work path to memorize it in order to be able to create the clipping path.
    This is the code:
    tell application "Adobe Photoshop CS3"
    tell current document
    make work path selection
    set name of path item 1 to "Détourage"
    make clipping path path item "Détourage" flatness 0.5
    end tell
    end tell

  • Possible to export clipping path from InDesign CS5?

    I ran into a minor problem. We just upgraded from CS1 to CS5 in our company and at the moment we're quite happy about the change to the more "modern" (if you are getting my hints here).
    Anyhow, before the new install of Adobe CS5 I just recently asked our IT-guy to reformat my pc and re-install Win XP again. I did this so I could start from scratch and eliminate most common pc-errors in the near future (I took over this pc from someone else some time ago who used and installed stuff on it which I didn't know about nor needed).
    Most of my data and files were backed up and re-installed. However, to my great horror I just realized that some of the linked image-files in an InDesign document containing A LOT of clipping paths are no longer listed as linked but missing. I checked and saw that these image-files weren't backed up at all.
    Now the problem isn't getting back these images as I can quickly download and relink them from a number of databases.
    However, these images were all painstakingly cut out in Photoshop by creating clipping-paths for each and every one of them and those clipping-paths are now lost with the deleted files.
    If I check my InDesign file now I can see that every preview still retains the original cutpath from the original (but now deleted) Photoshop file. I have tried to mark this cutpath first, copy it and then tried to see if I could insert it back into an image-file that I opened in Photoshop but this didn't - at least for me - work out.
    My question is now.., can these clipping-paths somehow be saved and re-imported back into Photoshop.
    Any creative, ingenious, cumbersome and even crazy thoughts and methods are very, very welcome as I'd hate to sit down once more and spend hours of re-creating those paths.
    Hoping on some bright brains out there... ;-)
    Thanks for any help in advance.

    You sir, are nothing short of a genius! :-)
    The last solution is exactly what I was looking and hoping for. I realize that this will take some extra time and work but that's a small headache in relation to redrawing each of those clipping-paths. Now that would be a true nightmare as well as it would take much more time.
    The clipping-paths are quite complex as they are drawn around images such as printers, mice, laptops, external harddisks, office-chairs, designer-furnitures (for office use) and the like since this is what our company sells.
    So the solution you suggested works perfect. I am deeply, deeply grateful for your input and time and thank you very, very much for helping out in this time of despair. ;-D
    If I can ever help you or anybody else with a good advice in return (I doubt I will know more than you but I can give it a try) please do not hesitate to contact me. I'd be most happy to do so.
    Allow me to ask you..., are you a private person helping out or are you part of the Adobe-team since it seems that you are well acquainted with the programs and trouble-shooting?

  • Extracting clipping path from a jpeg

    ImageMagick's 'identify -verbose' command will give you, amongst other things, the clipping path applied to a jpeg image. Is there any way to do this in J2D? Is there any way to do with any opern source image processing tools?
    Thanks
    Peter

    Peter,
    The cleanest way is to lock your imge, the draw the cut shape with the Pen Tool, set Fill to None and a suitable Stroke Weight. For rounded paths, you ClickDrag Handles out from carefully chosen Anchor Points all the way round, ending where you started. You may adjust the position of the current Anchor Point while you draw by pressing the Spacebar, which lets you freeze the Handles and move the Anchor Point about; you can Ctrl/Cmd+Z to go back, and you may start over. To practise with the Pen Tool, you may try some (outlined) letters from a font with serifs, or any relevant curved path that resembles the desired cut path for the image.
    Or, if you have a distinct colouring where you want the cut path, you may Object>Image Trace the image with the right settings (including creating (stroked) paths, then expand and delete everything but the cut path.

  • Script to Sort Images with/without Clipping Paths?

    I've searched for a while and can't find a script that will sort a folder of images into two new folders that contain images with and without clipping paths. Anyone have or know of a script that will do this for me? I'd would greatly appreciate it. W7, PS CS5 32 and 64 bit.
    Thanks in advance!
    Andy

    Hi Andy, Mike has a function to check for clipping groups but requires the file to be open...
    // Function: clippingPathIndex
    // Description: Gets the index of the activeDocument's clipping path
    // Usage: clippingPathIndex()
    // Input: None
    // Return: Index as Integer. -1 if there is no clipping path
    function clippingPathIndex(){
         var ref = new ActionReference();
              ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
         var desc = executeActionGet( ref );
         var clippingPath =  desc.getObjectValue(charIDToTypeID("Clpg"));
         return  clippingPath.getInteger(charIDToTypeID("ClpI" ));
    I think it should be possible to check the files without opening them using Bridge, looking at the Photoshop File Format it says....
    If the file contains a resource of type 8BIM with an ID of 2999, then this resource contains a Pascal-style string containing the
    name of the clipping path to use with this image when saving it as an EPS file. 4 byte fixed value for flatness and 2 byte fill rule.
    0 = same fill rule, 1 = even odd fill rule, 2 = non zero winding fill rule. The fill rule is ignored by Photoshop.
    I will see if I have time today to put something together for you.

  • Acrobat stripping out clipping paths from jpegs in batch processing

    Acrobat 8.
    I'm using the batch processing feature for watermarking both
    fpo jpegs (and low res pdfs) and I've noticed that when saving to
    jpeg, clipping paths in the original jpegs are lost.
    How do I get acrobat to retain the clipping paths?
    Thanks,
    TGMike.

    Hi,
    This isn't really the best place to post your problem as this
    is the forum for the acrobat.com service. I would advise you to
    check out the regular Acrobat forums at
    http://www.adobeforums.com/cgi-bin/webx/.3bbeda8b/

  • 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"; 

  • Open pictures in Camera RAW and still have paths/clipping paths?

    Hello
    A big problem in Bridge is that I can not open my pictures in Camera RAW and still have my paths left. I work in a place where we get loads of product photos from many different companies and they almost always have a clipping path in it. Many of the pictures do we have to fix like colour, exposure etc and this is here Bridge comes in as the best solution to batchfix them. But now I have to take the long way through Photoshop. Is there a solution for this?, an update from Adobe or a script or something.
    Have a nice day!

    You do know that you can deconfigure Camera Raw from opening TIFFs and JPEGs, right?
    These are the settings I've chosen.  Done this way, JPEGs and TIFFs just open right into Photoshop, and their clipping paths would be intact.
    -Noel

Maybe you are looking for

  • How to get XML data of IDOC

    Hello ABAP gurus I am an SAP PI consultant working on some IDOCs. I am able to see the payload (in XML format)  sent via IDOC adapter. This is being sent to our backend system (ECC 6.0). I would like to know if there is any way that I can see this ID

  • [SOLVED] AUR submission problems

    Dear all I have lately had a weird issue with uploading a pkgbuild. https://aur.archlinux.org/packages.php?ID=45558 AUR complains with the following error: Error - source tarball may not contain nested subdirectories. If I look at the .src.tar.gz (ge

  • Problemas con RMAN y OEM

    Buenas Tardes EN una de las bases de datos de produccion aunque se realiza bien el respaldo, lo vi en RMAN y el destino de los archivos respaldados, en OEM aun esta como ejecutandose y no se deja eliminar, que debo hacer para que vuelva a su estado n

  • Daily Incremental Load

    Hi All, I got a situation where I want to load 9GB/50Million+ of data daily into my warehouse system from a 10g source database. This is just daily incremental volume. With PL/SQL what would be fastest and best way of doing this without giving heat t

  • Should I buy a macbook pro or an air mac?

    Hello! I'm a very light user when I'm at home(only use chrome and watch some movies). I wonder if I should buy an Air Mac instead of a Macbook pro. Maybe I'll download some games like Sim City. Thank you