Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8647817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:09:53+00:00 2026-06-12T13:09:53+00:00

This is a bit of a complicated question because I don’t really know where

  • 0

This is a bit of a complicated question because I don’t really know where to start or what technology to use to arrive at the desired result. It may be possible with Photoshop Extended but a PHP or AppleScript script might also to the trick.

I need a script with the following input, process and output.

Input :

Hundreds of transparent PNG images on which I have varying quadrilateral shapes. All the images will have the same canvas size but the shape and position of the quadrilaterals will vary. Here is an examples of what one of these images with look like.

Quadrilateral image

Processing :

The script would need to loop through these images and detect the approximate extremities of the shapes.

Coordinates

Output :

The output would need to be a text file in which each line would contain the name of the image file and its associated coordinates. For example, a line in this export might look like this.

image-18473003783.png; 27,144; 406,241; 116,297; 468,386

You may have guessed that we want to create image maps for all of these images and wish to automate the process. The data will be inserted into a MySQL database.

Again I am open to suggestions as to the methodology and language used to achieve the desired result.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:09:54+00:00Added an answer on June 12, 2026 at 1:09 pm

    What you’re after is layer bounds.
    Here’s what you need in javascript – you might be able to convert the info here into applescript or tailor it to what you need.

    //pref pixels
    app.preferences.rulerUnits = Units.PIXELS;
    
    // call the source document
    var srcDoc = app.activeDocument;
    var myDocName = srcDoc.name;
    
    // set current width values
    var W = srcDoc.width.value;
    var H = srcDoc.height.value;
    
    var x = srcDoc.activeLayer.bounds[0]
    var y = srcDoc.activeLayer.bounds[1]
    var x1 = srcDoc.activeLayer.bounds[2]
    var y1 = srcDoc.activeLayer.bounds[3]
    
    alert(myDocName + " "+ x + ", " + y + ", " + x1 + ", " + y1)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is a bit complicated, as there are alot of moving parts, but
Ok, going to reword this question as i made it a bit too complicated
This is a bit of subjective question about a specific situation. Main goal for
I know that this question has been asked loads of times, but I have
I'm not the best with multi-threading, and this is a bit complicated, so hopefully
Bit of a complicated SQL question here. I currently have a SELECT statement which
So this is a bit complicated situation, so I will try to explain what
This is a pretty complicated question so be prepared! I want to generate some
One question for design about communicating between fragments, why would someone use a bit
The question is a bit complicated so I will try and explain. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.