pixels

Pushing pixels on the iPhone

What's the fastest way to get a framebuffer and render to in software on the iPhone? Basically getting into a mode 13h style thing going so I can make some effects? :) ...

How to push pixels faster on the iPhone?

I asked before about pixel-pushing, and have now managed to get far enough to get noise to show up on the screen. Here's how I init: CGDataProviderRef provider; bitmap = malloc(320*480*4); provider = CGDataProviderCreateWithData(NULL, bitmap, 320*480*4, NULL); CGColorSpaceRef colorSpaceRef; colorSpaceRef = CGColorSpaceCreateDeviceRGB();...

which one would you use to draw stuff on a winform? Format32bppRgb or Format24bppRgb or something else?

in any .net version Format24bppRgb Specifies that the format is 24 bits per pixel; 8 bits each are used for the red, green, and blue components. Format32bppRgb Specifies that the format is 32 bits per pixel; 8 bits each are used for the red, green, and blue components. The remaining 8 bits are not used. ...

OpenGL: inaccurate color?

I'm trying to follow the directions from this page: http://www.opengl.org/resources/faq/technical/color.htm regarding rendering primitives with a unique color I've checked the number of bits for every color and the result was 8 for each. When calling: glColor3ui(0x80000000, 0, 0xFF000000); and reading back the pixel with glReadPixel...

Converting an array of Pixels to an image in C#

I have an array of int pixels in my C# program and I want to convert it into an image. The problem is I am converting Java source code for a program into equivalent C# code. In java the line reads which displays the array of int pixels into image: Image output = createImage(new MemoryImageSource(width, height, orig, 0, width)); can so...

how to decompose integer array to a byte array (pixel codings)

Hi sorry for being annoying by rephrasing my question but I am just on the point of discovering my answer. I have an array of int composed of RGB values, I need to decompose that int array into a byte array, but it should be in BGR order. The array of int composed of RGB values is being created like so: pix[index++] = (255 << 24) | (r...

Pixel Programming continued

I have got a byte array of pixels in BGR order and I want to create an image out of it in C#. Can anyone offer code or advice? ...

Convert Pixels to Inches and vice versa in C#

I am looking to convert pixes to inches and vice versa. I understand that I need DPI, but I am not sure how to get this information (e.g. I don't have the Graphics object, so that's not an option). Is there a way? ...

Silverlight device independent coordinates

I've written a Silverlight application that does not scale when I change from 96 dpi to 120 dpi The text and graphics does not change physical size on the screen as measured by a ruler. I've read in various places that Silverlight should adjust to changes in DPI configuration. The non-Silverlight portion of the web page scales as expec...

WPF - canvas height in pixels

How can I determine the width in pixels for a canvas (which has a certain width)? I have a bitmap in an AnimatedImage control, and I know the bitmap's width in pixels, and I want to scale the bitmap so that it horizontally fits exactly the canvas. How can i determine this scale? Note: I do not need to use RenderTargetBitmap, because t...

How can I read a pixel's color from a BitmapImage in Silverlight?

I have a BitmapImage instance in Silverlight, and I am trying to find a way to read the color information of each pixel in the image. How can I do this? I see that there is a CopyPixels() method on this class that writes pixel information into the array that you pass it, but I don't know how to read color information out of that array. ...

algorithm for finding out pixel coordinates on a circumference of a circle

how do i find out pixel value at certain degree on the circumference of a circle if I know the pixel co-ordinates of the center of the circle, radius of the circle ,and perpendicular angle. Basically, I am trying to draw the hands of a clock at various times ( 1 o clock , 2 o clock etc ) ...

Converting Pixels to Bezier Curves in Actionscript 3

Ok, so I'll try to be as descriptive as possible. I'm working on a project for a client that requires a jibjab-style masking feature of an uploaded image. I would like to be able to generate a database-storable object that contains anchor/control positions of a bezier shape, so I can pull it out later and re-mask the object. This all i...

How can I modify the pixel data of a UIImage on the iPhone?

I want to modify a UIImage on a pixel-by-pixel basis. I've found a couple of posts here and elsewhere about accessing the image data as a char* pointer. My twist is that I want to modify this data and then create a new UIImage based on my pixel data. Anyone done this before? ...

How can I adjust the RGB pixel data of a UIImage on the iPhone?

I want to be able to take a UIImage instance, modify some of its pixel data, and get back a new UIImage instance with that pixel data. I've made some progress with this, but when I try to change the array returned by CGBitmapContextGetData, the end result is always an overlay of vertical blue lines over the image. I want to be able to ...

wordpress menu position

Hello, I am running a website using wordpress and some javascript that changes the page see http://s72956.gridserver.com/dev/ My menu position I want to be static at 150px down 800 right and not move when I change my browser window to any size. Currently when I try position static it moves when I clikc on one of my javascript links that...

Bresenham line algorithm (thickness).

Hello. I was wondering if anyone knew of any algorithm to draw a line with specific thickness, based on Bresenham's line algorithm or any similar. On a second thought, I've been wondering about for each setPixel(x,y) I'd just draw a circle, e.g.: filledCircle(x,y,thickness); for every x,y but that would of course be very slow. I also ...

Silverlight Pixel Api

Lets say I have a black and white .jpeg image. How could I change the white pixels in the jpeg image to red using the hexidecimal format (ie going from #FFFFFFFF to #FFFF4F4B)? ...

Fast work with Bitmaps in C#

I need get all pixels from Bitmap, work this they and save them to Bitmap. If I use Bitmap.GetPixel() and Bitmap.SetPixel() then I have very slow program. How I can fast convert Bitmap to byte[] and back? I need byte[] with size (4 * width * height) and contains RGBA of each pixel ...

How can I read how many pixels an image has in Python

Possible Duplicate: How to check dimensions of all images in a directory using python? I was wondering if somebody knows how can I read an image total amount of pixels in a python sript. Could you provide and example? Thanks a lot. ...