Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting the Pixel Color of Several Points
#1
Guys,

How can i get the pixel Hexadecimal color of several points and save the colors in a .csv file?


Its somehing like that :

int w=win("window")
act w
int colors=
pixel(484 491)
pixel(470 403)
pixel(467 438)
pixel(605 290)
pixel(473 481)
pixel(426 587)
pixel(260 337)
pixel(388 479)
pixel(388 366)
pixel(502 362)
pixel(410 521)

Set colors to "C:\DATA\ColorData.csv"


Could you please help me ?
#2
Hi lostruler!

Macro PixelsToCSV
Code:
Copy      Help
lpstr T=
;pixel(484 491)
;pixel(470 403)
;pixel(467 438)
;pixel(605 290)
;pixel(473 481)
;pixel(426 587)
;pixel(260 337)
;pixel(388 479)
;pixel(388 366)
;pixel(502 362)
;pixel(410 521)

str s s1 s2 s3

ICsv v._create

foreach s T
,s1.gett(s 1 "( )")
,s2.gett(s 2 "( )")
,int col = pixel(val(s1) val(s2))
,s3+ F"{s1}, {s2}, 0x{col}[]"

v.FromString(s3)

out
out s3
;save to file
v.ToFile("$desktop$\DATA\ColorData.csv")

Cheers Smile
#3
Thanks a lot!


Forum Jump:


Users browsing this thread: 1 Guest(s)