bitmap

Bitmap editing in unsafe context - how to avoid instability?

I'm trying to use a bitmap in an unsafe context, and am seeing instability in that, e.g., the program runs the first time round but fails the second. Here is the code: private static void RenderBitmap(Graphics g) { const int width = 150, height = 150; using (Bitmap bmp = new Bitmap(width, height, System.Drawing.Imaging.PixelFor...

Android Combine Bitmaps -> Video

Hello, I have a array of Bitmaps. How could I combine them into a video to store on the SD Card? Thanks, Isaac ...

Problem reading in some byte data into a Bitmap

Hi folks, I'm trying to read in a hardcoded bitmap image into a bitmap object. I keep getting the same error: System.ArgumentException: Parameter is not valid. This is the code i have... const string fakeByteData = "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUV...

Looking for image rectification resources

I'm looking for some good resources (articles, algorithm descriptions, SW libraries...) on image rectification for GIS purposes. Are there any .NET-accessible open source libraries for this? Thanks in advance ...

How to create a bmp file from byte[] in C#

Hello, I have a byte[] array received in TCP Client.The array contains a 24-bit RGB Bitmap file.How to create that bitmap file with given Width ,Height and data? In C++ I use this int WriteBitmapFile(const char *filename, int width, int height, unsigned char *imageData) { FILE *filePtr; // file pointer BITMAPFILEHEA...

A strange Problem about gdi+ bitmap!

I am using the following code to get a Bitmap point, (width = 800, height = 600); Bitmap* m_BitmapCanvasCore = new Bitmap(width, height, PixelFormat32bppARGB); but the m_BitmapCanvasCore always is NULL... Is there any thing wrong about gdi+? Or any namespace polution I need to avoid? Why? ...

I get the image reversed in C#

Hello,this is my code to turn a byte[] array into an image unsafe { //convert the UInt32[] into byte array and then assign the pointer to it fixed (byte* ptr = Misc.ConvertFromUInt32Array(image)) { Bitmap bmp = new Bitmap(200,64,800, PixelFormat.Format32bppRgb, new IntPtr(ptr)); bmp.Save("test.bmp"); } } A...

How to put image in a picture box from Bitmap

Is it possible to load a picture from memory(byte[] or stream or Bitmap) without saving it to the HDD This is the code I use to turn the byte[] array into Bitmap unsafe { fixed (byte* ptr = Misc.ConvertFromUInt32Array(image)) { Bitmap bmp = new Bitmap(200,64,80...

GDI+: Alternatives to DrawReversible for visual selection indicators?

I've searched around for an alternative way of drawing selection indicators for visual objects (like selected edges, lines etc.) without the use of ControlPaint.DrawReversibleFrame and related XOR methods. The reasons are unwanted XOR-ing "artifacts", reversibility not applying to bitmaps, no control of the actual visual look and slownes...

[JOGL] Why won't my text show up?

For some reason which I can't figure out for the life of me, my text in my JOGL hello world program won't show up at all. I'll include the display method so you'll all know what I'm talking about. public void display(GLAutoDrawable gLDrawable) { final GL gl = gLDrawable.getGL(); final GLU glu = new GLU(); GLU...

How can I use a custom bitmap for the "you are here" point in a MyLocationOverlay?

I've poured over the docs and haven't been able to figure this out. Is it even possible? Relevant documentation: http://developer.android.com/reference/com/google/android/maps/MyLocationOverlay.html ...

When is a CGBitmapContext not a BitmapContext?

I have a CGContext that I create with CreateARGBBitmapContext from here. When I do CGBitmapContextGetBitsPerComponent it tells me 8 bits per component (Which is correct) However, when I do CGBitmapContextGetBitmapInfo or CGBitmapContextGetData, I get NULL. Those are only supposed to give NULL when the context isn't a bitmap context. How...

How can you extend the Bitmap class

Hello, I am trying to extend the Bitmap class so that I can apply my own effects to an image. When I use this code: namespace ImageEditor { public class Effects : System.Drawing.Bitmap { public void toBlackAndWhite() { System.Drawing.Bitmap image = (Bitmap)this; AForge.Imaging.Filters.Gra...

In Flex, how do I create, populate, and display a bitmap?

Starting from a totally empty MXML application: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" > </mx:Application> What is the script that will: create a bitmap (should this be a BitmapData object?) programatically populate it with data (e.g. draw a circle) (i...

From Bitmaps to Video Streaming

Hello guys, I'm building a C# application that continuously takes screenshots of the screen. While I'm taking the screenshots, I want to stream them using vlc. Any ideas of how can I send the bitmaps to vlc for streaming? tks in advance Jose ...

Getting color image from bitmap while image is 16bppGrayscale

Hi, Problem No1. My own Related problem I asked the next question here Now the Problem No 2 is. When i am trying to open 16 Bit (Monocrome ) images from their raw pixel data then i am getting Error. Because i am using PixelFormat.Format16bppGrayscale on creation of Bitmap like Bitmap bmp = new Bitmap(Img_Width, Img_Height,PixelForma...

WPF render performance with BitmapSource

Hi! I've created a WPF control (inheriting from FrameworkElement) that displays a tiled graphic that can be panned. Each tile is 256x256 pixels at 24bpp. I've overridden OnRender. There, I load any new tiles (as BitmapFrame), then draw all visible tiles using drawingContext.DrawImage. Now, whenever there are more than a handful new til...

Printing Bitmap Images Using PCL

Dear Team, I am trying to communicate with hp 102 laserjet printer directly using pcl language. Using pcl5 technical quick reference guide, I can print the text, set margins, select supported fonts, print monochorme images (of 1 bits per pixel). In the reference guide, there is no sample provided to print images of other formats like ...

Overwriting an image file (bitmap)

Hello I am trying to save a bitmap image in a basic image editor program. Here's the code: // then save it ImageBoxInApp.Image.Save(filename); [EDIT] And I am opening the image with this openFileDialog1.Title = "Select an Image"; openFileDialog1.Filter = "All Files|*.*|Windows Bitmaps|*.bmp|JPEG Files|*.jpg...

Displaying a bitmap on a "BUTTON" class window in WIN32

Edit: I think the WM_CREATE message isn't sent during the creation of child windows (namely my button). So by calling SendMessage during WM_CREATE, I'm sending a message to a window that hasn't been created yet. The solution for now is to call SendMessage() during the WM_SHOWWINDOW message. Do child windows send WM_CREATE messages at c...