pixel

Getting pixel data from UIImageView -- works on simulator, not device

Based on the responses to a previous question, I've created a category on UIImageView for extracting pixel data. This works fine in the simulator, but not when deployed to the device. I should say not always -- the odd thing is that it does fetch the correct pixel colour if point.x == point.y; otherwise, it gives me pixel data for a pixe...

A better way (or alternative) to calculate Pixel and % in CSS?

I'm not saying that I'm lazy to do math, but is there a better way to perform this task: I have a page that with width: 960px, inside it has 2 divs that are width: 50%. That's quite simple, but if I want to add 1px border I have to calculate 960/0.5 minus the extra pixels of the borders, they should be 4px but strangely they are counted ...

Visual Studio 2008 Resource Editor

Hi, I am on VC++; What is the unit used in Resource Editor? It does not seem to be pixel.. Than how to use pixel, or is there a option to use pixel? Here is a screen shot... ...

Getting the pixel value of BMP file

Hello, i got a question for reading an bmp image. How can i get the pixel value(R, G, B values) in an bmp image? Can anyone help me using the C programming language? ...

How Bicubic-interpolation work?

After reading text about this said topic, i found out that it considers 16 of the original neighboring pixels. What i want to know is how does it compute the color value of the new pixel. If the color of pixels can be determined by 200,100,255, how could you compute the value of the new one? ...

[Cocoa OSX] Can't detect color of a pixel in a pixel that... changes color

Hello, I am trying to create an application that when the color of a pixel on screen changes to another one (that I know what it is) it does something, doesn't really matter to the question what it does. Anyway, I am using this: CGImageRef window283x420 = CGWindowListCreateImage(NSMakeRect(284, 420, 1, 1), kCGWindowListOptionOnScreen...

Remove a section of a website; web browser control. C#

Is there any way of removing a section of a website without altering the code. Let's say for an example, I would create a webBrowser control in my windows form and tell it to load stackoverflow.com, would there be any way of removing; lets say the top 100 pixels from displaying? Thanks Lawrence ...

LibGD strange bug when plotting random coordinates

Hey all, I'm using LibGD to plot a bunch of random coordinates and output a png of the result. Here's the code: #include <gd.h> #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { srand(time(NULL)); gdImagePtr image; FILE *pngout; int num_pixels; int xy; cout << "num_pixels: "; cin >> ...

Convert jpeg/png to an array of pixels in java

How can I convert a string containing a jpeg or png to an array (preferably one dimensional) of pixels? Ideally using classes built into java? ...

Handling alpha channel in WPF pixel shader effect

Is there something unusual about how the alpha component is handled in a pixel shader? I have a WPF application for which my artist is giving me grayscale images to use as backgrounds, and the application colorizes those images according to the current state. So I wrote a pixel shader (using the WPF Pixel Shader Effects Library infrast...

Pixel chains from run length encoding

I've been banging my head for a long time on this one I am doing imaging. So far I've binarized my images, meaning that from a grayscale image, every pixel under a certain value are dropped. This gives me only some regions out of the original image with a lot of "zero pixels" all around those regions. Next I've run length encoded my re...

How can I get and set pixel data in XNA?

I have a texture2D where I want to get the color of a specified pixel. Do something with it and put a new color in an other texture2D. I will need to do this with all the pixels in the texture. How can I do this. No pixel shader's please. It need to be in C# ...

how to set/get pixel on a texture in OpenGL ES on iPhone?

I am trying to Google for what I've mentioned in the title, but somehow I couldn't find it. This should not be that hard, should it? What I am looking for is a way to gain access to an OpenGL ES texture on iPhone, and a way to get/set pixel with it. What are the OpenGL ES functions I am looking for? ...

Can I use a C# dll with unsafe code in VB.NET?

There is an FastBitmap class for C#, that lets you acces and modify pixel information of am bitmap. I have already used it in some C# project, but I need it now in VB.NET. The problem is that that class uses unsafe code, that is not supported in VB.NET. The question is. Can I compile the FastBitmap class in a dll and use it in VB.NET? ...

Can you have multiple pixel (fragment) shaders in the same program?

Hopefully this is an easy question. I like things being organised, so I would like to have two pixel shaders; the first doing one thing, and then the next doing something else. Is this possible, or do I have to pack everything into the one shader? Thanks. ...

how to remove what setpixel put on the window?? (c++)

im using SetPixel to make stuff on my window which is the easyest because i only want to set one pixel at a time. SetPixel is great but i need to remove the color every time i update it, i could overwrite the color by black but.. it's a really big waste of time is there some way i can over write all of the colors to black? (i would like ...

Is it possible to get pixel coordinates of text and draw a rectangular border around it using Javascript?

Dear all, I am evaluating technology options for an upcoming project, and one of the requirements is to draw a rectangle around certain groups of words in a text field. Each time the text is evaluated and parsed, certain recognized parts of it must be boxed with a rectangle, which should also respond to mouse clicks. There is even a re...

Pixel color replacement working fine on simulator but not on iPhone

Hi, I am dealing with an iphone application which would choose a specific colored pixel from the image and replace it with some other color shades i choose from color menu. Problem is that the code i have implemented is working fine on simulator, but when i run the same code on device all i get is that, the image's pixels are replaced b...

Manipulating pixels using only toDataURL

The problem I have is this: I need to be able to dynamically tint an image using Javascript, but I cannot access pixel data via the canvas. I can, however, store the dataURL (or any other text-based data format) and include that with the code, manipulate that data, and then create an image object using that dataURL. My question is, ho...

Calculating pixel length of an image

Hello, May I know what are the ways to calculate the length of 1 pixel in centimeters? The images that I have are 640x480. I would like to compare 2 pixels at different places on the image and find the difference in distance. Thus I would need to find out what's the length of the pixel in centimeters. Thank you. ...