GETPIXEL()

Previous topic - Next topic

WPShadow

Hi!

Wie genau kann man den einzelnen Farbwert bei Getpixel raus bekommen? Die Werte die ich bekomme sind vermutlich HEX, brauchen w?rde ich widerum RGB - Werte von 0 - 255, um einzelne Werte zu errechnen...

Gru?

W.
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

Schranz0r

SuFu:

Code von Quentin:

Code (glbasic) Select
  color = RGB(250, 13, 56)
  red = bAND(color, 255)
  green = bAND(color / 256, 255)
  blue = bAND(color / 256 * 256), 255)
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

WPShadow

Wird eingebaut! thx!!!
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

Hemlos


Hey there WP
The getpixel command is sensitive..

Just a couple tips from a little experience with this command:

Getpixel has a margin of error, if your computer or any computer your program is installed on, has a video card using "antialiasing"(this is very common for game players to use for smoothness of colors).
So to solve this you can do 2 things:
1. If you need it to run dynamically(realtime) then turn off antialiasing...and make a help file for your program to tell your users to do that too.
2. use getpixel(again make sure AA is off) in the development phase of your software, convert the data into data files(you may need to encrypt them), this will allow you to develop, and not need to worry about your users needing to shut off antialiasing.

-Hasta, Hemlos

Bing ChatGpt is pretty smart :O

WPShadow

I try to make something like this:

http://www.youtube.com/watch?v=Bcalc8UoJzo

But not as professional as ATI do!  :nana:
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

Hemlos

That is a tile demo, why do you need getpixel for this?
Bing ChatGpt is pretty smart :O

WPShadow

Need a little time to show you the first demo!
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est