pixel

Xcode - Drawing Pixels

Hi guys; I am trying to draw individual pixels in xcode to be outputted to the iphone. I do not know any OpenGL or Quartz coding but I do know a bit about Core Graphics. I was thinking about drawing small rectangles with width and height of one, but do not know how to implement this into code and how to get this to show in the view. Any...

convert pixel to cm

If I have distance in pixel using this formula: sqrt((x1-x2).^2+.(y1-y2)^2)) How can I converted it to CM? ...

Java - scan screen for color

Hey, I would like java to scan screen for particular color. Any ideas if how to do that? Thanks ...

Pretty Pixel-level Picture Painting, Programatically

My mac laptop has 1,024,000 pixels. What's the simplest way to turn my display completely black and go nuts with writing little programs to twiddle pixels to my heart's delight? To make it more concrete, say I wanted to implement the Chaos Game to draw a Sierpinski triangle, at the pixel level, with nothing else on the screen. What are ...

Update a portion UIView

Hi; I'm using -setNeedsDisplayinRect to update only a part of my UIView. However, all of my drawing done previously to calling this method is erased. Here is my code in the UIView subclass: -(void)drawRect:(CGRect)rect{ CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetRGBFillColor(context, r, g, b, 1); ...

How do I get the pixel color under the cursor?

I need a fast command line app to return the color of the pixel under the mouse cursor. How can I build this in VC++, I need something similar to this, but ideally not in .NET so it can be run many times per second? ...

Draw image from pixel data arrays

If I have an array of pixel data in JavaScript, is there a good way to display it on an HTML page? On recent versions of Safari and Firefox, I can make a <canvas> element and use putImageData to display the pixels, but ideally a solution could work on older versions as well and more importantly, work on Internet Explorer. Another solut...

Determine bits per pixel in a bitmap

What's the easiest way to tell the number of bits per pixel in a bitmap, e.g. a Windows .bmp file? ...

Actionscript 3 pixel perfect collision. How to? (learning purposes)

I know that there are people out there creating classes for this (ie http://coreyoneil.com/portfolio/index.php?project=5). But I want to learn how to do it myself so I can create everything I need the way I need. I've read about BitMap and BitMapData. I should be able to .draw the MovieClips onto a BitMap so I could then cycle the pixel...

OpacityMask from LinearGradientBrush with Absolute GradientStops in Silverlight 3

My question is similar to this one. However, the answer in that thread does not work for me, because I'm using the LinearGradientBrush for an opacity mask. I've got a grid with three rows: <Grid.RowDefinitions> <RowDefinition Height="50" /> <RowDefinition Height="*" /> <RowDefinition Height="50" /> </Grid.RowDefinitions> ...

Get Pixel color of UIImage

How can I get the RGB value of a particular pixel in a UIImage? ...

iphone sdk change color of pixel

How can I change the color of an individual pixel programmatically in the iPhone sdk? ...

How to obtain pixel's rgb values in an image in android

Hello, I am working on a little side project (program for Android platform)and I don't exactly have a problem, but I don't really know where to start. The project I am working on has to do with getting the info and manipulating a pixel's RGB values inside an image. I know this is a very basic program (not going to disclose all the info...

GWT: IE8 problem with composite over DockLayoutPanel, the unit EM, and the Singleton design pattern

Hi everyone, I have a "Welcome Screen" which is made by hand from the entry point. On the other side, I have Widget named Main which uses the Singleton pattern: this Widget encapsulates the application funcionality and there should be only one instance in the application. This Widget is a composite over a DockLayoutPanel, which has nor...

How to color a pixel?

I have to create a simple 2D animation without using various primitives for drawing line, circle etc for the purpose. It has to be done by manipulating pixels and implementing one of the algorithms for drawing line, circle etc by coloring pixels. I thought of using Turbo C for the purpose, but I use ubuntu. So I tried using dosbox to in...

Can't find error in pixel searching algorithm

Ok, I'm trying to make a program that finds the position of a colored pixel within the desktop. To do this I make a screenshot of the desktop then go through the pixels and search for the one that has the matching RGB as i need. The only problem is that my program returs strange coordonates X,Y for the found pixel... #include <stdio.h> ...

How to obtain pixel’s rgb values in an image in iPhone sdk

Hello, I am working on a little side project (program for iPhone platform)and I don't exactly have a problem, but I don't really know where to start. The project I am working on has to do with getting the info and manipulating a pixel's RGB values inside an image. I know this is a very basic program , but I am a beginning iPhone program...

Convert lat/lon to pixels and back

I'm using google maps in my application, and I have a webserver with a databse filled with lat/lon values. I want to mark them on the map, but I also want to cluster them together if they are within a certain pixel-distance of eachother. I figure if I retrieve all my points from the database, I should be able to do something like this (...

getting pixel data/modifying it

Ok so what I am trying to do is get an image from the camera roll, displaying it through the image view, and then getting some pixel data and modifying it (change brightness levels through the RGB values of the pixels). I'm a beginning dev and I can't seem to really get the hang of CGImage to actually get the pixel data. Could anyone hel...

Is there a way I can scan for all pixels with similar pixel data

I have been wondering for quite some time if there is a way to find the locations of all the pixels that match a certain pixel set in a UIImage. What I have so far is a simple code to find the RGB8 values for the pixel I have selected: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyOb...