How to export the coordinates of a (rectangular) object in a layer in a PSD (angle)

I have a large number of PSD files with a separate extra layer that displays a square dotted to indicate a specific area on the product. Using scripts, I can export the data in a txt file. However, this only works for the rectangular area that are horizontal. In some cases, the area of the rectangle is placed in an angle (lets say 45 degrees).

Assuming that all areas are rectangular and some are in a corner, pourrais I export sort a txt file that displays the coordinates of the 4 corners of the object in a layer?

Just figured it out. Just test it with a document opened with the layer of the selected shape.

#target photoshop
var doc = activeDocument
var curLayer = doc.activeLayer
var p = doc.pathItems.getByName (curLayer.name + ' Shape Path')
var pItems = p.subPathItems[0].pathPoints
var pPoints =''
for(var i=0;i

Tags: Photoshop

Similar Questions

  • How to adjust the boarders of a rectangular selection in the paint without stretching the image.

    Hi, how to set the boarders of a rectangular selection in the paint without him stretch the image?

    I'm afraid this is a limitation (and personally, I find frustrating) paint. Essentially, you get a chance to make a selection. A trick I learned is to zoom as high as possible, start a corner of the selection, and then (while holding down the left button of the mouse to the operation drag) hold Ctrl key while turning the mouse scroll wheel to zoom out giving a larger surface to complete the dragged selection.

  • How to export the Indesign to Format XML using JavaScript document

    Hi all...

    Can someone help me, how to export the indesign document to XML Format using JavaScript...

    Thanks in advance...

    doc.exportFile ( ExportFormat.XML, File(Folder.desktop+"/doc.xml" )
    
  • How to export the JPEG to CMYK in LR3?

    How to export the JPEG to CMYK in LR3?

    You pouvez save a JPEG file to CMYK from the printing in LR6 Module.

  • How to export the output document for real cinema screen film

    recently, I made a documentary film. My documentary film was shown in the screen of the great real cinema at the film festival

    However. It was not published in 16 / 9. my film stretched to the size of the screen.

    I filmed with HD and HDV. I used the Canon Mark 2 camera, gopro and sony Z 5

    When I used first pro CS5, I export the movie with H264 (HDTV 1080 p high quality)

    is - this just how I export the movie to screen large cinema with first Pro CS5

    Let me know on this subject?

    The 16:9 screen?

    The size of the screen has nothing to do with it.

    Your image was distorted on the screen?

    If you have exported your 1080 16:9 properly with correct BY etc. and specification of the festival... then they projected in correctly.

  • Export the coordinates of line endpoint?

    Hello

    I'm in desperate need of a script to export the coordinates of lines, or paths, it does not really matter in a text document.

    I have configured my sovereign so the value 0.0 is at the center of the image, because I need to 0.0 and - 0, -0 to work for what I have in mind, essentially using a document such as a great Cartesian grid, which you can then extract coordinated "edges" or endpoints of the lines.

    A little history on why I need, for anyone curious. I found a way to build new worlds/cards for a game that generates the from field of the "borders", which are drawn on, on a 2d plane, but I need the coordinates to map these limits correctly. I could do it manually, where I would spend my mouse on each edge or end point of the line, but it would save a LOT of time.

    I would be incredibly grateful if someone can help out me. I tried looking for scripts or other software, but have failed at all for what I really need.

    The way I have my document setup is, 1 pixel per cm, 16384x16384cm. It's big enough, so most of the "Graphic" software do not work for her. The grid itself works well enough, I just need a decent way to export contact information.

    Thanks in advance!

    Edit:

    Here, I made an example of a rectangle for you guys give the idea of what coordinates I would need:

    http://i.imgur.com/VILOwrL.PNG

    var dataFile = new File('~/desktop/exportData.txt');
    var doc = app.activeDocument;
    var dataStream = "";
    // loop the paths in the document
    for(var pathIndex =0; pathIndex		   
  • How to export the same MB size of my cr2 files in jpg or tiff files in Lr?

    How to export the same MB size of my cr2 files in jpg or tiff files in Lr?

    Let's say that my height is 22 MB, when I export the file in TIFF or jpg, although careful Iam with size of file settings, size, resolution, I can't manioukate how I want it.

    With jpg I tried everything, no matter what I do or a change in file size or meanless remains the same size - 7 mb instead of 22...

    Please advise,

    Best wishes

    T

    You should not even try to do it.

    JPG uses compression technology, so the files will have to be smaller than the original size of your RAWs. In addition, JPGs are 8-bit, while your RAWs are probably 14 bits, so the size needed to store your image will be smaller.

    Thus, there is absolutely nothing wrong with getting a 7 mb JPG of a 22 MB RAW.

  • How to export the indesign file to coreldraw

    Hi all

    I had created a brochure that would be printed to a professional printer. There, they use Indesign. Instead, they use Corel Draw.

    How to export the indesign file created in corel draw.

    and printing

    @Dov, sorry. But there are places on Earth where the upgrade to a more modern workflow just will not happen either by choice, or more often, because of the money. I've dealt with a few printers to India use CD (beautiful dig to Corel, btw) or Illy. Just like that.

    @srikanth977, all printers I treated using an older workflow and equipment that use CD or Illy for output agreed a PDF file. In addition, each of them wanted to PDFX-1A a PDF file without crop marks, bars of color, etc.. So check with your printer. They then add these features when they print.

    Best regards, Mike

  • How to export the list of devices in the Profile Manager?

    Hello

    is there a way to export the list of devices in the Profile Manager on a mini mac running OS Server 5.3?

    Thank you

    How to export data from device in the Profile Manager

    How to export a list of devices and their info?

  • How to export the cookies to restore later?

    I don't know how to export bookmarks for a later restore. I also want to export cookies that I use on my normal websites, so I can also restore them later.

    Thank you

    There is an extension which exports cookies to the old text file format. That could allow you to delete the ones your do not want by using a text editor. I think that you would need the extension again to reimport the file (modified) in Firefox.

    https://addons.Mozilla.org/firefox/addon/cookies-exportImport/

  • How to export the bookmarks?

    In older versions of Firefox it was obvious how to export bookmarks. On the new version, I have not a clue. I need to move the bookmarks to another computer

    Bill


  • How to export the bookmarks from Firefox 4.0b3

    How to export 4.0b3 favorite Internet Explorer, because the traditional "bookmarks" tab no longer appears?

    If you press the ALT key the traditional menu bar will appear temporarily. You can then use the method listed in the article export Internet Explorer Favorites .

  • How to obtain the coordinates of the cursor in a field in 3D?

    I have a land in 3D with discrete points. The cursor is indicated and broken so that I can move the cursor to select a point to the nearest point. I was wondering how can I get the coordinates of the cursor in the 3D plot so that I can point to the point (change the size or shape) which the cursor is located. I wasn't able to find coordinates using nodes property. Any suggestions will be appreciated. Thank you.

    Xueliang

    Is this working from home?

    This thread offers advice for hwo to use 3d graphics.

    http://forums.NI.com...=161218#M161218

    This an apperntly has an example to enter the values of the slider.

    http://forums.NI.com...=108612#M108612

    Ben

  • How to export the graph xy with indicator field.

    Hello

    I want to export my chart to the .emf format. For this I used call node > image export. If I use this, I can only export the chart not another indicator filed(numeric_and_string_indicatror).how can export chart with flag field?

    This is .vi I used.

    Thanks for your post in our Discussion Forum,

    is it necessary to export the image to the .emf Format?

    If not, I can give you two options:

    The best way to make a screenshot of a certain area of the façade is of

    create a Subvi with all the items you want to take a screenshot of and

    Then take a screenshot of the entire façade of the Subvi.

    It works fine even if the front is not visible, while the photo is taken.

    The screenshot can be taken with a method node as in the example attached to this post.

    Another possibility is to reframe a screenshot of an entire façade to the region you are interested in.

    How this works is described here: http://forums.ni.com/t5/LabVIEW/take-screenshot-of-part-of-front-panel/td-p/1613750

    The downside is that you must manually set the region that could change because of the scrolling or changes on the Panel.

    Best regards

    Peter

  • How to export the model to xls (xlsx) file?

    Oracle SQL Developer Data ModelerOracle.datamodeler4.0.0.833Fully Loaded23153749153772

    How to export models to xls (xlsx) files that could then be used to "Update the model with previously exported file XLS (XLSX)."

    This choice can be found with right click on the relationship of design in designs-> relational models,

    Two variants of DataModeler installs have the same list of choices:

    SqlDeveloper-> DataModeler-> file-> Export

    DataModeler-> file-> Export

    The design of data Modeler

    DDL file

    Cube metadata views

    To Microsoft XMLA

    For Oracle AW

    In the CSV format

    Schema statement

    But can't figure out how for example change and use the exported CSV files so that they could be used to update the model.

    rgrds Paavo

    Hi Paavo,

    Simply create XLS (XLSX) specific model report search results.

    Then you can edit the XLS (XLSX) file and import it to this model.

    Concerning

Maybe you are looking for