Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 22:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



pixel farbe abfrage

Discussion on pixel farbe abfrage within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2011
Posts: 8
Received Thanks: 0
pixel farbe abfrage

hej all,

also ich will in c++ auf einer eingestellten kordinate zb.: (500,500) ein farbe abfragen, ob das die farbe orange ist und das in einer if schleife verknüpfen.. ich brauche jetzt nur die richtig funktion und wie man sie anwenden.

hoffe auf schnelle antwort danke..

lg phil
aliasrexxzz is offline  
Old 11/21/2011, 20:08   #2
 
elite*gold: 9
Join Date: Dec 2009
Posts: 1,071
Received Thanks: 819


Nächste mal die SuFu nutzen. Das Thema gabs schon 10 mal...
.Infinite is offline  
Old 11/21/2011, 20:11   #3
 
elite*gold: 0
Join Date: Nov 2011
Posts: 8
Received Thanks: 0
hej danke für antwort

ja die habe ich auch bereits gefunden aber ich weiß leider nicht so ganz wie ich diese funktion umsätzten soll oder anwenden soll.. hmm

lg
aliasrexxzz is offline  
Old 11/21/2011, 20:54   #4
 
elite*gold: 9
Join Date: Dec 2009
Posts: 1,071
Received Thanks: 819
Hier mal ein Beispielcode...

Code:
#include <iostream>
#include <Windows.h>

using namespace std;

int main()
{
	HDC hdc = GetDC(NULL);
	COLORREF color = GetPixel(hdc, 100, 100);
        ReleaseDC(NULL, hdc);

	int color_red = GetRValue(color);
	int color_green = GetGValue(color);
	int color_blue = GetBValue(color);

	cout << "\nRot:   " << color_red << "\nGruen: " << color_green <<"\nBlau:  " << color_blue;

	cin.get();
	return 0;
}
Alternativ kannst du natürlich auch einfach color ausgeben...
.Infinite is offline  
Old 11/21/2011, 23:15   #5
 
elite*gold: 0
Join Date: Nov 2011
Posts: 8
Received Thanks: 0
jawohl.. danke!! hat mir sehr viel geholfen!
aliasrexxzz is offline  
Reply


Similar Threads Similar Threads
[C++]Pixel Farbe erkennen
11/02/2011 - C/C++ - 2 Replies
Hallo Com, Kann man in C++ eine Farbe auf einem bestimmten Pixel erkennen? Die Farbe ist als RGB 255,51,51 und als Web ff33333. Der Pixel ist 960x566. Als Grundgerüst hätte ich: int Pixely = 960; int Pixelx = 566;
[AutoIT]Farbe von Pixel ändern
06/14/2010 - AutoIt - 14 Replies
also wie der überschrift schon sagt möchte ich gerne wissen wie man die farbe von einem pixel verändert!! Der Script: #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=C:\Users\AlienForce\Desktop\Koda\Forms\crossh air.kxf $GUI_main = GUICreate("CrossFire Crosshair", 250, 209, 193, 143) $Button1 = GUICtrlCreateButton("Crosshair Aktivieren", 8, 8, 233, 73, 0) GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif") $Button2 = GUICtrlCreateButton("Crosshair Deaktivieren", 8,...



All times are GMT +2. The time now is 22:18.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.