Questions tagged [getpixel]

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

187 questions
0
votes
0 answers

Using byteArray with getPixel (no 's') then setPixelS

Here is what I am trying to do: one byteArray (colorsByteArray) holds color values, that I created with the "getPixels" method; for every pixel on screen, I make calculations and depending on that I get a rank that I use to retrieve the proper…
Oggy
  • 83
  • 7
0
votes
1 answer

How to get the color of a pixel

In my code below....i wish to add a yellow bar at the bottom if upon firing a bullet, the bullet reaches the moving bar at the top(which is a trail of alternative yellow and cyan boxes) and touches it at a yellow box.For that what I am planning is…
Suraj Pandey
  • 31
  • 1
  • 7
0
votes
1 answer

getpixel from externan application MFC

the color is #B38300 but it returns me #074092 I'm trying get pixel color of 3D Application. ::SetForegroundWindow(tempHWND); Sleep(2000); HDC hDC = ::GetDC(tempHWND); COLORREF rgb = ::GetPixel(hDC,50,60); int redValue = GetRValue(rgb); int…
Klasik
  • 744
  • 1
  • 7
  • 25
0
votes
1 answer

Grabbing Pixel data from a video strem

I am having trouble if understanding certain coding i am sorry if this comes off as stupid but i have a code to capture a video from my webcam i want to get the RGB valuee from the frame, if this is impossible would have to to save a frame as a…
0
votes
1 answer

Checking to see if the color of a pixel is a predefined system color?

In the following code: Bitmap bmp = new Bitmap((int)ArrayHeight, (int)ArrayWidth, System.Drawing.Imaging.PixelFormat.Format32bppArgb); Graphics gBmp = Graphics.FromImage(bmp); gBmp.CompositingMode = CompositingMode.SourceCopy; …
zetar
  • 1,185
  • 2
  • 15
  • 41
0
votes
0 answers

kineticjs zoom extents

Is there a way to zoom extents of a collection of shapes without computing min/max xy's and wh's - very painful when sloping lines are involved. Perhaps some kind of pixel detection?
Chris Glasier
  • 683
  • 2
  • 9
  • 20
0
votes
2 answers

two getpixel method names the same

I am trying to open and read the pixel values for two separate images on the same form in c#. I get an error reading the following: Error 1 Type 'imageAlign.Form1' already defines a member called 'GetPixels' with the same parameter types…
0
votes
0 answers

Read an Image in Java and perform Affine Transforms

So for a class project, I have to read an Image file and performAffine Transforms on it. I found how to do the format using information which is present in the Complete Reference bool using the PixelGrabber class. However, I have to do this for a…
gran_profaci
  • 7,133
  • 12
  • 55
  • 94
0
votes
1 answer

GetPixel on DirectX Application

I have the following code: procedure TForm1.Button1Click(Sender: TObject); var XYCoord: integer; window: hwnd; c: TCanvas; result : TColor; color : string; begin c := TCanvas.Create; window := FindWindow('Atlantica Online', NIL); …
Michael Grenzer
  • 483
  • 1
  • 9
  • 20
0
votes
3 answers

improving speed of GetPixel function in c#

i need to read getpixel of bmp with speed but is very low i used of LockBits private void LockUnlockBitsExample(Bitmap bmp) { Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height); System.Drawing.Imaging.BitmapData…
jozi
  • 2,653
  • 6
  • 26
  • 40
0
votes
1 answer

CopyPixels method in Bgr32 format

i'm just doing a simple job: Converting a bitmap into an array, then using that array, recreating the bitmap with BitmapSource.Create method. However, i'm getting the error: "Value does not fall within the expected range". Here's my code. …
Burak Yavuzalp
  • 189
  • 1
  • 1
  • 10
0
votes
1 answer

How to fasten Bitmap.SetPixel without using unsafe method?

How can I fasten Bitmap Set/GetPixel method without using unsafe mode or any other solutions from codeproject like FastPixel or FastBitmap (which actually also uses unsafe mode).
rank1
  • 910
  • 3
  • 14
  • 33
0
votes
1 answer

Are there similar android methods of java getData().getPixels()?

I'm trying to use the following code of java to read image data on android. Since ImageIO is not supported, what are some ways I may use getData().getPixels()? By changing BufferedImage into Bitmap, I can get all other codes working besides…
James
  • 749
  • 1
  • 14
  • 31
-1
votes
1 answer

How to get pixel data from an image taken by the iphone

the problem isnt getting the pixel data i was able to find some source for that -(NSArray *)getRGBAtLocationOnImage:(UIImage *)theImage X:(int)x Y:(int)y { // First get the image into your data buffer CGImageRef image = [theImage CGImage]; …
lufthansa747
  • 1,502
  • 3
  • 17
  • 35
-1
votes
1 answer

How to use GetPixel() to check different positions

I have a program that HAS to use GetPixel, but in different positions, after reading one value and evaluating it, it has to change the x,y positions and re-evaluate the values of the other function. I have the current code: while (true) { …
1 2 3
12
13