Skip navigation
Currently Being Moderated

Offset Path Script for PS CS5 Possible?

Jun 21, 2012 11:24 AM

Hey all, my needy self is back to ask if anyone has heard of or attempted a script that will offset a path in the same way Illustrator does. ?

 

I have a group of images with clipping paths penned too much to the outside of the image edge, which will result in the "halo" effect when pasting into InDesign. Currently, I'm copying the path into Illustrator, using Offset Path with a negative value, then pasting back into PS, deleting old clipping path, and saving.

 

Thanks in advance for any help!

 
Replies
  • Currently Being Moderated
    Jun 21, 2012 11:36 AM   in reply to Andymc7

    Inset the path in id using the options…

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2012 12:46 PM   in reply to Andymc7

    The problem is script has no idea of how much halo you get in id… Relative to the scaling factor. At leat you can preview the result doing this in ID. You can't adjust an existing path item in PS just read out the data then create a new path with math your adjustments… If you search the forums you won't find much regarding bézier math and ExtendScript. I've tried to get my head around this with AI scripting and failed miserably on several occasions…

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2012 1:48 PM   in reply to Andymc7

    If you are going to try this in PS then a few things I would add… Path Items I recall are one of the PS items that presume 72dpi so change image res while trying to work them then put back res… Making path from selection is not going to cut it ( well doesn't for me ) I wouldn't make selection from path, contract, make new path and remove old… If you manage it, do post your findings I may be able to utilize myself … nothing like cheek…

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2012 2:11 PM   in reply to Andymc7

    I agree with Mark, the main problem I see is the script has no way of knowing if the path is off or by how much. And as he pointed out there is no easy way( that I know of ) to preview a clipping path in Photoshop.

     

    Having said that if it just a matter of scaling down the size of the path to correct for the 'too much to the outside of the image edge' that is easy to script if you can figure out the scale amount.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2012 2:33 PM   in reply to Andymc7

    Scale in not going to work in numerous cases… or so I think…? If a path is not square-ish or has compounds… would you not need the creep to go in both directions? Just thoughts… For a doughnut you want the outer loop to get smaller and the inner to get larger no?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 21, 2012 3:15 PM   in reply to Andymc7

    Yeah, sorry compounds is an Illustartor term… ( but you know what I mean ). You have path operators a bit like pathfinder in PS, that deal with add/sub/intersect… not sure you can access all that though been a while since I tinkered with this…

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2012 12:06 AM   in reply to Andymc7

    The task would seem to be a complicated one to me indeed.

    It would be possible to determine the direction of a path at the position of a curve pathPoint and »move the point« some distance angled 90˚ relative to that, but with corner points there are problems (compare the Corner > Miter etc.-settings in Illustrator).

    The amount by which the bezier handles of the offset points would have to be shortened or lengthened and, even worse, where additional points would have to be introduced make it even more complicated.

     

    If the script were possible, or existed, it would just need to be written for PS only.

    A BridgeTalk-Script handing the path’s information over to Illustrator, editing it there and passing it back would probably be easier.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2012 1:33 AM   in reply to c.pfaffenbichler

    I have looked into the very same issue some time back… Like I said my math skills failed me but thats not to say it can't be done… AI would be a no go from the point you would need to do the same thing there. No built in commands for insetting/offsetting and path items… As of CS6 it may be possible but a hassle still ( you can now evoke menus and run actions )… When I searched I could find almost nothing in ExtendScript… I would suspect that developers of this kind of stuff would use C++ ( is that right for plug-ins? ) and not be willing to share such hard work… I found stuff in other languages but I couldn't translate…

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2012 2:01 AM   in reply to Muppet Mark

    Illustrator’s Object > Path > Offset Path can not be Scripted directly?

    Dang, that Illustrator team sure seems to know how to play difficult when it comes to automation …

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2012 2:44 AM   in reply to c.pfaffenbichler

    Up until CS6 nope… Only recordable in action and ExtendScript can't run actions only AppleScript & VB can. The changes added to CS6 should open up a lot though… Illustrator team I would use that term lightly… Doesn't there need to be more than one to make a team?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2012 2:53 AM   in reply to Muppet Mark

    Illustrator team I would use that term lightly…

    OK, I may have done somebody a disservice by not trying to find out how many people at Adobe are actually involved in developing Illustrator … I just assumed the number would justify the term »team«.

    Is there anything we should know about? (Not that this is the place or you would be likely to be at liberty to divulge any information you may have beyond what a quick googling did find – pretty much nothing.)

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2012 4:08 AM   in reply to c.pfaffenbichler

    Nope that would just be my sarcastic sence of humor… shinning though…

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2012 4:15 AM   in reply to Muppet Mark

    Roger that.

     

    In »Adobe_Fast_Facts_3_2011.pdf« Illustrator is not even metioned under »Flagship products and solutions« …

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points