getpixel

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 complcated... I wonder if there is a library that can put the whole region into an array, and pixel[x]...

getPixel-method - how do i get the R value of RGB ?

Hi there .. i have a greyscale image and i want to scan the pixels out of the Image and this is what i get : var i:int; var j:int; for (i = 0; i < img.contentWidth ; i++) { for(j = 0; j < img.contentHeight; j++){ pixeldaten.addItem({x:i,y:j,pixel:bmd.getPixel(i,j)}); } } but the table doesn't look like ...

Why GetPixel() is so slow using Ruby (or probably Perl or Python too) and how to do it by other methods?

I tried using Win32's GetPixel() with Ruby and it is really slow even on a Quad Core Intel machine. I think for example, if I get a really small region such as 100 x 10 pixels = 1000 pixels and it can take 30 seconds to complete. Is there a better way such as by getting a region all at once? ...

QT QImage pixel manipulation

Hi, I am building a QT GUI application and use QImage for opening images. My problem is that I can't figure out how to use QImage's bit() and scanline() methods to get access at per pixel level. I've seen this post http://stackoverflow.com/questions/857962/qt-qimage-pixel-manipulation-problems but this is only for the first pixel of ea...

Capture the browser screen as JPG/PNG/etc with Flash?

Hi, Is there a way to create a screenshot of the browser in Flash? I know that in Java this is possible, and it will popup a dialog asking for trusting the signed Applet, but is there a way to do this in Flash? ...

Determine if getPixel() value is greater than or less than 50% gray

I am trying to loop through a bitmap and determine if each pixel is lighter or darker than gray using getPixel(). Problem is, I am not sure how to tell whether the value returned by getPixel() is darker or lighter than gray. Neutral gray is about 0x808080 or R:127, G:127, B:127. How would I need to modify the code below to accurately de...

C# Problem with getPixel & setting RTF text colour accordingly

Heyo, I'm messing with converting images to ASCII ones. For this I load the image, use getPixel() on each pixel, then insert a character with that colour into a richTextBox. Bitmap bmBild = new Bitmap(openFileDialog1.FileName.ToString()); // valid image int x = 0, y = 0; for (int i = 0; i <= (bmBild.Width * bmB...

AS3: How to access pixel data efficiently?

I'm working a game. The game requires entities to analyse an image and head towards pixels with specific properties (high red channel, etc.) I've looked into Pixel Bender, but this only seems useful for writing new colors to the image. At the moment, even at a low resolution (200x200) just one entity scanning the image slows to 1-2 Fra...

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 write some graphics / image. I have tried like this, but it is not working. why the foll...

How to filter a specific color from a bitmapData object (or byte-array)

I'm looking for an efficient way to filter a specific color from a bitmapData object in ActionScript 3. Currently I use a loop with readByte32(). This takes about a second to process which is unacceptable. I have been trying to get paletteMap() to work but so far haven't been able to grasp its API (any truly useful links? Google has ...

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). (disregard the border) I'm using this to iterate through the captured bitmap: for (int ...

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 => 0, map => 'RGB', #normalize => 1 ) print Dumper \@pixels; $img->Resize( ...

Getting pixel colour in C#?

Hey. I'm wondering how to get pixel colour (not from a bitmap, but a game)? I've found some solutions on stackoverflow already, but I was told C# is an easy language and getting pixels colour doesn't seem to be something extraordinary, so maybe there's simplest way than 25 lines of code that is impossible to understand for a dummie like...

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 in memory, or something like that. I need to run getPixel() multiple times "per-tick," w...

How to copy pixels from one bitmap to another shaped like a circle ?

I am using setPixel and getPixel functions but they are using matrices which is naturally rectangle.I am trying to copy pixels shaped like circle ! update : now i am using this but i hope there is something more efficient than this one : for(int i=0;i<eHeight ; i++) for(int j=0;j<eWidth ; j++) if( Math.pow((i-eHeigh...