bitmap

How to initialize 48bpp bitmaps from RGB?

I'm writing an interpreter in managed C++ for, among other things, the PPM image format. The image spec allows for images with up to two bytes per pixel per channel, or 48 bit per pixel color images. I'm attempting to read this format and convert it to a .Net bitmap, but im having trouble getting it working. When I have 24 bit per pix...

Taking a screenshot with tooltip & cursor visible

this is code am using to take a screenshot [DllImport("gdi32.dll",EntryPoint="DeleteDC")] public static extern IntPtr DeleteDC(IntPtr hDc); [DllImport("gdi32.dll",EntryPoint="DeleteObject")] public static extern IntPtr DeleteObject(IntPtr hDc); [DllImport("gdi32.dll",EntryPoint="BitBlt")] public static extern bool BitBlt(IntPtr hdcDe...

Resize (Zoom in and Zoom out) in Compact Framework (C#)

Hi! How I can zoom in a bitmap on Compact Framework? I read this article and http://geeks.netindonesia.net/blogs/clawford/archive/2008/04/20/resizing-bitmap-tutorial-in-net-cf.aspx and it's only to make the bitmap smaller. Thank you! ...

Reading monochrome bitmap pixel colors

I don't know a better title, but I'll describe the problem. A piece of hardware we use has the ability to display images. It can display a black and white image with a resolution of 64 x 256. The problem is the format of the image we have to send to the device. It is not a standard bitmap format, but instead it is simply an array of by...

How to read a bitmap in OCAML?

I want to read a bitmap file (from the file system) using OCAML and store the pixels (the colors) inside an array which have th dimension of the bitmap, each pixel will take one cell in the array. I found the function *Graphics.dump_image image -> color array array* but it doesn't read from a file. ...

Is it possible to convert an ASP.NET control to a picture on the fly?

In ASP.NET, If I have an multi-line text box (or even a 3rd party rich text box), can I convert its content to a picture during postback? By convert I mean to keep the format & content in the picture. For example, I have a rich edit box, end user can add fancy text font and symbols directly on it, once they hit "submit", is there a way...

How do I reduce a bitmap to a known set of RGB colours

For a hobby project I'm going to build a program that when given an image bitmap will create a cross-stitch pattern as a PDF. I'll be using Cocoa/Objective C on a Mac. The source bitmap will typically be a 24bpp image, but of the millions of colours available, only a few exist as cross-stitch threads. Threads come in various types. DMC...

Get a Bitmap from a WPF application window?

The Winforms System.Windows.Forms.Control class has an instance method "DrawToBitmap" which I think is very useful in a variety of circumstances. I'm wondering if there's an equivalent way of getting a System.Drawing.Bitmap from a WPF application? I realize I could do some P/Invoke stuff to just get the application window, however I ...

OCR: limits of small character bitmaps and normalization

Hi, I want to use a neural network to determine which character is shown in a bitmap. I take these bitmaps from digital screenshots and I got them in b/w. I wonder, what dimensions these character bitmaps should have. Right now I'm using the top and bottom of the line, and the left+1 and right+1 bound of each charakter. I use these boun...

Render VML to bitmap in C#

Is there a way in C# / .NET to render VML into a bitmap? I'm thinking this should be really easy, but I can't seem to find anything like this in the .NET docs. ...

Generate image with some transparent parts

Hello all, Im trying to generate a small square 32 by 32 pixels with a 10 by 10 squareish transparent gap in the middle. This is what I have so far: private Image CreatePicture(){ // Create a new Bitmap object, 32 x 32 pixels in size Bitmap canvas = new Bitmap(32,32,System.Drawing.Imaging.PixelFormat.Format16bppRgb555); for...

How to copy the pixel data from a texture into a bitmap (direct3d)?

I have rendered the scene into a texture, and then I want to save it into a bitmap, but after lock the texture, I found there is no pixel data in the lock area. The texture can be displayed correctly on the screen. I am not sure why? 1> the format is incorrect? A8R8G8B8 has been used. 2> have I missed some important steps before get the ...

Rendering to a single Bitmap object from multiple threads

What im doing is rendering a number of bitmaps to a single bitmap. There could be hundreds of images and the bitmap being rendered to could be over 1000x1000 pixels. Im hoping to speed up this process by using multiple threads but since the Bitmap object is not thread-safe it cant be rendered to directly concurrently. What im thinking i...

Android : Bitmap save to location

I am working on a function to download an image from a web server, redisplay it on the screen, and if the user wishes to keep the image, save it on the SD card in a certain folder. Is there an easy way to take a bitmap and just save it to the SD card in a folder of my choice? My issue is that I can download the image, display it on scre...

using BitmapSource as Image source in WPF

Hello Everyone, I am trying to update an Image (_browserScreenshot below) object in XAML by changing the source image every time an event determines the source needs updating. Right now I have this: public BitmapSource GetScreen() { Bitmap bitmap = new Bitmap(app.Browser.ClientRectangle.Width, app.Browser.ClientRec...

Copy one Bitmap onto a larger Bitmap using without using Graphics.DrawImage

This is a follow up from http://stackoverflow.com/questions/648975/rendering-to-a-single-bitmap-object-from-multiple-threads What im trying to achieve is to take a bitmap of say 50x50 pixels and draw it onto a larger bitmap(100x100 pixels) at any point on the larger image, using the bitmaps LockBits function or any other but NOT graphic...

Marshall.Copy method throws AccessViolationException in C#.NET

Hello, I am working on a C# application that would display live images from a camera. The problem i am facing with the below code snippet is that, i get AccessViolationException in Marshall.Copy method when running this function executed continuosly in a thread. But, this runs successfuly when run once (i get a single static image). I g...

How to programmatically detect if a bitmap has alpha channel ?

As subject. Preferibly using C code. Thanks, ...

How can I generate a Bitmap from a winform control?

How can I generate a bitmap of a control on a winform using C#? ...

How do you extract an image from a pdf file using C#

How can I get the image from a .pdf file into a System.Drawing.Bitmap? ...