pixel

Creating/modifying images in JavaScript

Is it possible to dynamically create and modify images on a per pixel level in JavaScript (on client side)? Or has this to be done with server based languaged, such as PHP? My use case is as follows: The user opens webpage and loads locally stored image A preview of the image is displayed The user can modify the image with a set of s...

How to convert Pixels to Points (px to pt) in .NET? (C#)

I have a need to convert Pixels to Points in C#. I've seen some complicated explanations about the topic, but can't seem to locate a simple formula. Let's assume a standard 96dpi, how do I calulate this conversion? ...

Image Recognition

I'd like to do some work with the nitty-gritties of computer imaging. I'm looking for a way to read single pixels of data, analyze them programatically, and change them. What is the best language to use for this (Python, c++, Java...)? What is the best fileformat? I don't want any super fancy software/APIs... I'm looking for the bare...

Can pixel shaders be used when rendering to an offscreen surface?

I'm considering integrating some D3D code I have with WPF via the new D3DImage as described here: My question is this: Do pixel shader's work on offscreen surfaces? ...

Finding closest non-black pixel in an image fast

I have a 2D image randomly and sparsely scattered with pixels. given a point on the image, I need to find the distance to the closest pixel that is not in the background color (black). What is the fastest way to do this? The only method I could come up with is building a kd-tree for the pixels. but I would really want to avoid such ex...

Access to a single pixel in C#

Hello, I'm working on a school project right now. It's meant to be a 3D editing software, (like a very minimized version of Maya). I have to write it in C#, using the 'Windows Application Project'. I intend to implement all the 3D stuff myself, from projections to shading. My question is, how can I get direct access to a single pixel in ...

Pixel Drawing Algorithm

I need an example algorithm that will draw pixels one at a time on a grid based (x,y) system, and also color them based on an rbg value based on binary data that is provided in some form. I am looking for anything written in php or a php like language such as C, but that does not use any sort of library or graphics card api, as i am codi...

Transferring image data between C# and C++

Hello, I am working on a project where I'm going to create a user interface in a C# windows application. It needs to display a picture. And I want to transfer the picture data to a C++ module that will edit it and then return the result. I've already established how to transfer data between C# and C++ (I use a C++ DLL). My question is:...

How to work with pixel modifications

I am working on an i phone game. In that I have to create texture from a Quartz Image Source. Then i want to do some pixel modifications. I am a beginner with openGl. please guide me with the steps that should be followed ...

GDI+ resizing for Pixel zoom

I want to resize an image with the GDI library so that when I resize it to be larger than before there is no blending. (Like when you zoom in on an image in a paint program) EG: If my image is 2px wide, and 2px tall (white, white, white, black) , and I resize it to be 100% larger, it is 4px by 4px tall (white, white, white, white, white...

Line Art Effect by Pixel Shader in WPF?

I want to create a Line Art effect but as I got vertex shader is not supported by WPF now. Is there a way to create Line Art effect by Pixel Shader? Any idea? Thanks. ...

Fast pixel plotting using SWT?

I'm looking for a fast and easy way to plot arbitrarily colored pixels in an SWT Canvas. So far I'm using something like that: // initialization: GC gc = new GC(canvas); // inside the drawing loop: Color cc = new Color(display, r, g, b); gc.setForeground(cc); gc.drawPoint(x, y); cc.dispose(); This is horribly horribly slow. it takes ...

Alternative to 0px images (aka web beacons)

Hi all Our marketing department sends out a newsletter to 'opt-in' customers and would like to track how many of these emails were opened. This is NOT a spamming exercise - these clients can unsubscribe at any time and they opt-in to begin with. The problem is that many (most?) web and desktop email clients do not show images by defa...

Draw a single pixel on Windows Forms

I'm stuck trying to turn on a single pixel on a Windows Form. graphics.DrawLine(Pens.Black, 50, 50, 51, 50); // draws two pixels graphics.DrawLine(Pens.Black, 50, 50, 50, 50); // draws no pixels The API really should have a method to set the color of one pixel, but I don't see one. I am using C#. ...

Do all webcams use YUY2?

I've noticed that raw data from my webcam comes in the from of YUY2. Actually, this "raw data" is the input for an AVICAP callback, and I suppose that this is the actual data from the webcam. Anyway, do all the webcams use YUY2 format, or should I expect different formats as well? ...

Implementing zoom controls in MFC

I am working on a 'print preview' facility to show an overview of a slide with rectangular arrays of sample spots on it. The slides typically measure 25 x 75 mm and the spot samples are typically 0.1 mm in diameter. There is usually a 2mm gap around the perimeter of the slide where no spots are printed. The distance between spots (pit...

Per-pixel collision problem in C#

I am writing a small 2d game engine in C# for my own purposes, and it works fine except for the sprite collision detection. I've decided to make it a per-pixel detection (easiest for me to implement), but it is not working the way it's supposed to. The code detects a collision long before it happens. I've examined every component of the ...

How to crop part of gif image?

Hi every one, i wrote some code to crop large image to small one. Everything is OK but when i tried GIF images i get the following exception "A Graphics object cannot be created from an image that has an indexed pixel format." I'm using Graphics class to do this Graphics gfx = Graphics.FromImage(croppedBitmap) thank you. ...

change pixel color

Hi! I have to write a code on xcode to colorize the pixel on UIImage that the user touch. please any help? ...

Checking image feature alignment

Hi guys, I have written my own software in C# for performing microscopy imaging. See this screenshot. The images that can be seen there are of the same sample but recorded through physically different detectors. It s crucial for my experiments that these images be exactly aligned. I thought the easiest would be to somehow blend/substr...