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
2
votes
1 answer

Improve speed of video correction algorithm based on locked bitmap, getpixel and optimized auxiliary functions

I wrote this code to remove annoying patterns in a video due to camera malfunction. The problem is that to encode a 2 Minute video this algorithm needs more than 2 hours. I want to significantly reduce the time needed. The algorithm iterates over…
Fabien Biller
  • 155
  • 1
  • 1
  • 10
2
votes
0 answers

Getting pixel colour from bitmap returning wrong coordinate

I am very new to multi device programming in XE10 Firemonkey and wonder if someone can help me with a problem reading the pixel colour from a bitmap. What I want to do is sample a colour from a bitmap in a Timage control (like the way an eyedropper…
Peter
  • 61
  • 1
  • 3
2
votes
1 answer

Alternative to Bitmap.getPixel()

I remember a while ago reading about an alternative (aka faster) way to perform a getPixel()-ish method. Problem is, I don't remember where I read that, and I've searched thoroughly.. I think. The answer had something to do with locking the Bitmap…
Snailer
  • 3,777
  • 3
  • 35
  • 46
2
votes
1 answer

GetPixel memory leak in Python

I have a script that sits outside a game, reads pixels, and reacts to that information by "pressing keys", "clicking", etc. So to get the pixels, I am using code like this def function(): a =…
gr_y
  • 21
  • 1
2
votes
1 answer

How to get all the pixel data (RGB) of an image through c++

From a JPG or PNG file, I want pixel data in the form of 2D array. What is the procedure to do it OR which libraries can do that task?
Sparrow
  • 65
  • 2
  • 10
2
votes
3 answers

Perl & Image::Magick, getting color values by pixel

I'm using Perl and the Image::Magick module to process some JPEGs. I'm using the GetPixels sub to get the RGB components of each pixel. e.g. my @pixels = $img->GetPixels( width => 1, height => 1, x => 0, y =>…
aidan
  • 9,310
  • 8
  • 68
  • 82
2
votes
2 answers

Find pixel where max width and max height of a coloured area intersect using GetPixel()

I'm using GetPixel to get the colour of each pixel of an image. The images contain different plain-coloured irregular shapes, and I'd like to find the point (or pixel) where the maximum width matches the maximum height (see figure below). (source:…
pastapockets
  • 1,088
  • 2
  • 13
  • 20
2
votes
2 answers

C# How do I convert my get GetPixel / SetPixel color processing to Lockbits?

EDIT: I deeply appreciate the replies. What I need more than anything here is sample code for what I do with the few lines of code in the nested loop, since that's what works right in GetPixel/SetPixel, but also what I can't get to work right…
MaoTseTongue
  • 71
  • 2
  • 8
2
votes
2 answers

GetPixel returns incorrect values

This is my first post on this forum, please don't go hard on me if I didn't post it in the right place or if I did something wrong, I don't post in forums very much. So, I have this problem with GetPixel function. Basically, it should return the…
2
votes
1 answer

Result of Color.GetPixel().equals(Color.Blue) comes out false

Color c1 = image.GetPixel (7, 400); Color c2 = Color.Blue; Console.WriteLine (image.GetPixel (7, 400)); Console.WriteLine (Color.Blue); Console.WriteLine (c1.Equals(c2)); Console output: Color [A=255, R=0, G=0, B=255] Color [Blue] False I'm new to…
xglide
  • 55
  • 1
  • 7
2
votes
1 answer

Get pixels from IDirect3DSurface9?

I want to get a fast access to the pixels of a game which uses directX9 or 10. Therefore I used the D3D9 library. Do I have to use the D3D10 library when it is a directX10 game? If this is true, the next part is irrelevant. The following code works…
Jens Metzner
  • 109
  • 1
  • 13
2
votes
1 answer

Getting color from external image using JavaScript

So, I have tried looking this up in many places, but have not yet found an answer for my situation. What I have is a loop, looping for each hour in a day for every day in a year, and, with many insanely ridiculous mathematical equations, getting the…
2
votes
1 answer

Get Pixel Color on screen Java?

Hello I am trying to get the color of a particular pixel on my JFrame. This is my code. My frame is red. The problem I am having is when I click the Frame it should return me the RGB color for red that is (255,0,0) but when I click at different…
user3323742
  • 31
  • 1
  • 4
2
votes
0 answers

Getting the color of a pixel in an ImageView in Android

I am trying to get the color of the spot where I touched on an ImageView. And I succeeded using getPixel(x,y) for getting the color, but on another spot I am not getting the color of the pixel where I touched; I am getting the color of a different…
Jin
  • 462
  • 1
  • 7
  • 22
2
votes
1 answer

Using Gdiplus to get pixel value of an image

This is quite a simple thing, but I am not really trained in C++. I just need to get each pixel value of an image. Let us say that it is "C:\LM3S811\red.bmp", 169x104 pixel. By googling around the topic, I am convinced that gdiplus from Microsoft…
user2980324
  • 21
  • 1
  • 2
1 2
3
13 14