473,473 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

help with Getpixel

1 New Member
I am trying to extract RGB value of a particular pixel on the SCREEN (NOT picture box or etc)and compare it with given color
so far this is a sample code-

Dim ldc As Long
ldc = GetWindowDC(0)

agl1 = GetPixel(ldc, 230, 534)

Red1 = agl1 Mod 256
Green1 = (agl1 \ 256) Mod 256
Blue1 = (agl1 \ 65536) Mod 256


pls tell me what is wrong in this.
coz i get value as r=255 g=255 b=255
Jan 27 '08 #1
1 1269
harshmaul
490 Recognized Expert Contributor
Hi,
You'll probably have more luck posting this in the VB forums.
I'm not a VB guy myself and i only guessed it was VB, (cos of the dim!).
Feb 6 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Clyde Ellul | last post by:
Hi there. I need to write a simple program that reads a GIF image from an input stream, resizes it, then writes it back to an output stream in the same format (GIF). (JPEG input/output is good...
7
by: i_vincent | last post by:
Hi all, Newbie Python programmer here, so please be patient. I have spent all day googling for an answer to my problem, but everything I try fails to work (or works from the Interpreter with a...
0
by: Vincent | last post by:
Hello everybody, i'm searching a sample of c# implementation of Deriche edge detection. ( if possible, with getpixel/setpixel because i don't use pointer) i tried to adapt c or c++ code but...
0
by: Josch | last post by:
I have here a specific problem with ASP.NET in C#. I want to convert an Icon (System.Drawing.Icon icon) to a GIF-Image. First, my attempt was converting the icon to a Bitmap: Bitmap bmp =...
3
by: Serdar C | last post by:
i am looking for similar a command in VB.NET or c# which acts same as Point(x,y) command used in VB6.0.. please mail me if u know the answer..
7
by: Serdar C. | last post by:
ok i searched the internet for this api and i found the usage of getpixel api like this: getpixel(example.hdc,x,y) but i cant find any property about this "hdc".. that does that hdc 's equal in...
0
by: riskyfriend | last post by:
I am doing a project on image processing in c#. to perform the sobel operator i want to use lock bit method. but the probelm i face is here how i increment and decrement the pixels values in this...
0
MetalMartian
by: MetalMartian | last post by:
I'm trying to write code for a game based on the original Pacman in Visual Basic .NET 2003, however I can't figure out how to make the character move around the screen and not go through the walls....
2
by: devnew | last post by:
i am trying to get the pixel data using im.getpixel() i am getting a tuple like (152,118,106) for a pixel in a RGB jpeg image . what i really want is an integer value representing a pixel ,like...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.