• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] - Getting selection coordinates

Status
Not open for further replies.
Level 38
Joined
Sep 18, 2007
Messages
1,881
Hai mortals.
I have one small question.
I do not know which forum is proper for asking this, I think it is here.
Does anybody know how can I get right, left, top, bottom coordinates in picture when I select something?
For example this:
bluero10.png


This whole picture is 619x404, but I want 4 coordinates of that red selection around blue rose, in pixels. (its much smaller of course)
How can I get it? Can I see it in GIMP, Irfan View or any tool/program aside from photoshop?
I need that specifically for multiple small images in one such image, so I can get their coordinates.
 
Level 38
Joined
Sep 18, 2007
Messages
1,881
I3lackDeath, thank you for replying me, man, this is what I meant

genmap10.png


As you can see there is already program for what I need, it automatically shows coordinates, but point is that it can zoom or fix selection, if you miss something which means that if you miss selection, you must select again, there is no resize selection like in gimp and other programs. That goes me on nerves so I need to see if those programs can do such thing.
 
Level 38
Joined
Sep 18, 2007
Messages
1,881
Aha! Guys, I just found solution! it can work in any program, seems.

Look at screenshot from GIMP
coordi10.png


Now look at screenshot from IrfanView
coordi10.jpg


And now look that mapper which can produce all 4 coordinates.
coordi11.png


So, I just found this:
In gimp, my selection is
position 457x283
size 122x98

same in IrfanView (Selection 457,283; 121x98)

In that Cameo mapper program it is
Top: 283 Left:457 Bottom:381 Right:578 !!!
You see bottom and right are coordinates we are looking!
And we will find them easily

SOLUTION:

one number of position + one number of size, second number of position plus second number of size = third and forth coordinates!

position 457x283
size 122x98

457+122=579
283+98=381

Indeed, in cameo mapper Bottom is 381 and Right is 578

So its only matter of formula which number must be combined and thats it.
 
Level 38
Joined
Sep 18, 2007
Messages
1,881
Here, I found formula which is working.
To get coordinates for Left, Right, Top and Bottom of any selection in image, you will need to select manually area in image and know this:

Left = heigh
Top = with
Right = heigh + first number of selection size
Bottom = with + second number of selection size

Thats it. I3lackDeath can proudly mark this as solved and close. if I find something important regard this, I will tell him to do necessery changes in my post.
 
Status
Not open for further replies.
Top