GetPixel is a Windows GDI API function which retrieves the RGB color value of the pixel at a specific coordinates.
Questions tagged [getpixel]
199 questions
4
votes
2 answers
How do I get the color of a pixel at X,Y using vb.net
Hey I am able to set the color of image via set Pixel Property but when i put condition getPixel then no error occurs but the programme stucks
i put the code below please check it give me the solution :
Dim b As Bitmap = New…

Kartik Shah
- 143
- 2
- 5
- 14
4
votes
1 answer
How to get pixel value of Black and White Image?
I making App in netbeans platform using java Swing and JAI. In this i want to do image processing. I capture .tiff black and white image using X-Ray gun. after that i want to plot histogram of that Black and White image. so, for plot to histogram ,…

Jay
- 1,235
- 10
- 28
- 49
3
votes
0 answers
changing color of img except black pixels with javascript
So here is my problem:
I have black and white images (img tags), and i want to change the color of it except for the black pixels. I used a code that allowed me to do this, but when coloring the image, some of the black pixels are colored too, not…

Nour Hariz
- 75
- 5
3
votes
1 answer
optimal pixel-read back strategy
I need to render certain scenes and read the whole image back in main memory. I've search for this and it seems that most video cards will accelerate the rendering but the read-back will be very slow. After a bit of research i only found this card…

lurscher
- 25,930
- 29
- 122
- 185
3
votes
2 answers
Indexed 8bpp image and array of pixels without GetPixel
I need to get index of every pixel of my Bitmap in color palette (I have an indexed 8bpp image). Now I use the following way:
List data = new List(); // indexes
List pixels = bitmap.Palette.Entries.ToList(); // palette
for (int i…

Vlad i Slav
- 59
- 2
- 12
3
votes
3 answers
How to create Bitmap object from a Graphics object?
How to create Bitmap object from a Graphics object ? I would like to read pixels from my Graphics object. for example, like, System.Drawing.BitMap.GetPixel().
I am trying to find out empty area (all white, or of any colour) inside a pdf document, to…

vi.su.
- 685
- 2
- 9
- 19
3
votes
1 answer
While the reading of image for RGB pixel values there is different value of green in matlab and python
I want to obtain the pixel values for RGB from image.I did it in Matlab and Python but i obtained different values especially at the green value.
I'll appreciate if you have an advice about this matter.
Thanks
Here is my code in python
from PIL…

lisa
- 31
- 3
3
votes
1 answer
Roboelectric getPixel always returns 0
I'm trying to run some tests with Roboelectic over Bitmap and Getpixel methods:
((BitmapDrawable)Robolectric.application.getResources().getDrawable(R.drawable.color_test_1)).getBitmap().getPixel(100,100);
But whatever i try i'm always getting 0…

saikek
- 1,099
- 1
- 8
- 15
2
votes
1 answer
android Bitmap getPixel
I need to get the color of a pixel in order to compare it with a color from my color.xml file, but all values are negative and this comparison will always return a false result. How to get the proper color value? This color may be transparent. I've…

Buda Gavril
- 21,409
- 40
- 127
- 196
2
votes
2 answers
Bitmap.getPixel always returning black
I'm creating an app which involves getting the color of part of the screen.
To do this I am using the Bitmap.getPixel method to retrieve a specified pixel of the screen, than I am converting it to RGB format to make it easier for me to code with…

slazarus
- 97
- 2
- 9
2
votes
0 answers
Fast get pixel in OS X + Python
I want to get the rgb value of an arbitrary pixel on the screen. Preferably without having to load a full gui toolkit like qt or gtk. Taking a screenshot works, but it's an expensive operation and I'd like to run this thing in real-time, so I…

Jesse Aldridge
- 7,991
- 9
- 48
- 75
2
votes
1 answer
Bitmap.getpixel not reading right color?
I am trying to make a very simple tile engine. However, using the Bitmap.getpixel(x,y) is not always matching the color correctly. It seems to be doing fine with 0xFFFFFFFF, 0xFF000000, 0xFF189600, and 0xFF18FF00, but has a problem with…

NullMan
- 43
- 7
2
votes
1 answer
BitmapData and Marshal.Copy? What alternative for windows phone?
UPDATED:
Been looking around and trying to figure out what alternative there is for windows phone 7.1 for BitmapData. I have Commented out the code in question. I am aware of Lockbits and that its fast in comparison to get set pixels and so on.
As…

user970355
- 31
- 5
2
votes
1 answer
Fast gathering image on screen and reading the pixels
I'm trying to get a small section of image on the screen and read any pixel to compare the other pixels.The code to get screen image is:
Rectangle captureSize = new Rectangle(x, y, height, width);
BufferedImage image =…

cihad turhan
- 21
- 1
- 4
2
votes
1 answer
Get pixel color from window in background
I would like to get the color of a particular pixel in Python, from a specific window, witch is in the background, using its X Y coordinates, Iam using Windows10. (Im trying to write a script, witch bring window to front, when the specific pixels…

László Oláh
- 23
- 4