• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] - Getting selection coordinates

Status
Not open for further replies.
Level 34
Joined
Sep 18, 2007
Messages
1,727
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 34
Joined
Sep 18, 2007
Messages
1,727
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 34
Joined
Sep 18, 2007
Messages
1,727
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 34
Joined
Sep 18, 2007
Messages
1,727
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