PC Review


Reply
Thread Tools Rate Thread

Create Bitmap from byte[] gray levels

 
 
Ondrej Sevecek
Guest
Posts: n/a
 
      23rd May 2005
Hello,

I have a byte[] array containing values of 0-255 representing gray levels of
a picture. This has no common format (.bmp, .jpg, ...) it only stores the
bytes, one per a pixel.
I converted it from original matrix byte[,] so I know its real dimensions.

Now, I would like to display this as a bitmap. I tried to create
MemoryStream from the byte[] array, but then the call to Bitmap.FromStream()
exceptions with "Invalid parameter".

many thanks Ondra.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
byte[,,] to Bitmap? mallolnolla@gmail.com Microsoft C# .NET 5 11th Oct 2005 04:46 PM
Load a Bitmap : White color becomes gray Nicolas Pietrzak Microsoft Dot NET Compact Framework 1 21st Jul 2005 10:09 AM
Convert Bitmap to Byte and Byte to Bitmap Eka Gautama Microsoft C# .NET 2 11th Nov 2003 05:57 AM
create bitmap from byte* - pointer Soja Cender Microsoft Dot NET Compact Framework 1 20th Aug 2003 08:01 PM
create Bitmap from rawbuffer(BYTE*) Soja Microsoft VC .NET 2 14th Aug 2003 04:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:46 PM.