Questions tagged [getpixel]

GetPixel is a Windows GDI API function which retrieves the RGB color value of the pixel at a specific coordinates.

199 questions
1
vote
1 answer

Save R component from image RGB to an arrray on VB.Net 2010

I've this script on my program to read R component of an image and save it on an array: Dim citra_asli As Bitmap = New Bitmap(PictureBoxAsli.Image) Dim i As Integer = 0 Dim j As Integer = 0 Dim redValue(i, j) As Integer …
1
vote
1 answer

How to get pixels of an image in res folder of an android project

new to android. I don't think any of the questions on here are the same as mine. I have images loaded into my res folder. I put them into a drawable folder. How can I get the pixels of an image named bb.png in the res.drawable folder? I will need…
MikeShiny
  • 284
  • 6
  • 15
1
vote
2 answers

C++ fast library for drawing 2d with transparency

I'am looking for fast library too make some 2d drawings. I need only to draw polygons, change transparency of them. I don't want to display result in any window, saving to file will be enoght (faster = better) - I want to learn my algorithm how to…
Sparkzi
  • 83
  • 1
  • 6
1
vote
1 answer

Android getPixel from Bitmap randomly starts to return black

I'm developing a game for android using opengl es 2.0, and I use a height map bitmap to create a terrain. That works ok. During the game, I have classes which represent entities in the game which store in their instances their (x,y) positions. To…
jmacedo
  • 773
  • 1
  • 13
  • 24
1
vote
0 answers

as3 detect collision of a sprite with letters inside a page of text

I would like to use bitmapdata to detect collision of a sprite with letters inside a page of text. I have tried to do it with getPixels and test for the color but it seems that it's not accurate enough. I don't try hit test collision with bitmapdata…
1
vote
3 answers

C# alternative to setpixel

I have read through several articles which are alternatives to using setpixel/getpixel but I am not seeing how they relate to my issue. I have a multicoloured image which (depending on dynamic values taken from DB) changes the color of each pixel…
T1gg3rB0unC3
  • 151
  • 1
  • 10
1
vote
1 answer

getpixel()is showing error

i am using an image view in which i want to know the pixel color so i am using getpixel()... method but it is showing me an error .... this is the way i am using get pixel method.. image = BitmapFactory.decodeResource(getResources(), rid); …
Ashishsingh
  • 742
  • 2
  • 12
  • 31
1
vote
2 answers

how can i get pixel of an image in UIimageView by calling a touchEvent on an imageView?

I want to call an touchEvent on an imageView.On touch of a imageView,i want to get a pixel of an Image.I am using this:- - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; [sampleImage…
Nikhil Bansal
  • 1,545
  • 13
  • 29
0
votes
1 answer

android get pixel data from onPreviewFrame convert to a bitmap

how do i use onPreviewFrame (byte[] data, Camera camera) inorder to getPixel(int x, int y). I want to change the frame into a bitMap is that possible? I am using onPreviewFrame because I want to getPixel data every second, so it would be too…
steven minkus
  • 131
  • 2
  • 2
  • 14
0
votes
2 answers

getPixel on Android 2.3

I developed an application that is able to recognize the color of a selected image area. It works perfectly for Android 2.2. Now I'm trying to use it on devices 2.3. To make it work properly on 2.2 I had to overcome many problems caused by…
user1169390
  • 151
  • 11
0
votes
1 answer

respond to color events with java

I am building a java application to solve puzzles. The way i am coding it basically the program will take a screen shot, find a pixel in the screen shot, and move the mouse though the Robot function to that position on the desktop. I understand the…
user1179522
  • 145
  • 1
  • 3
  • 8
0
votes
1 answer

Getting individual pixels of another window with BitBlt

This is what I am currently doing: get window DC via GetWindowDC create a compatible DC with CreateCompatibleDC call GetPixel on my compatible DC Unfortunately, all of my GetPixel calls are returning CLR_INVALID. Here is my code. bool…
user2058002
0
votes
1 answer

any quick and easy way to capture a part of the screen? getPixel was slow and GetDIBits seemed a bit complcated as a start

I was trying some code to capture part of the screen using getPixel on Windows, with the device context being null (to capture screen instead of window), but it was really slow. It seems that GetDIBits() can be fast, but it seems a bit…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
0
votes
2 answers

Overhead of calling the Operating System

What is the overhead of calling the operating system some large amount of times? For instance, Microsoft has an API called "Getpixel" You have to supply the x,y co-ordinates and it will return a colour value. Setpixel then has to make millions of…
BigBug
  • 6,202
  • 23
  • 87
  • 138
0
votes
1 answer

C# GetPixel doesn't give exact color when Valorant is open

When I use getpixel to grab the current color of a pixel from my screen, it has a slight variation from the actual, true value. For example, the background color of vs studio is 31, 31, 31 but it will give me anything ranging from 28 - 34. This…