Click here to Skip to main content
15,846,091 members
Home / Discussions / C#
   

C#

 
GeneralRe: reading xml file to listbox Pin
Yustme9-Jan-07 2:26
Yustme9-Jan-07 2:26 
QuestionHow to provide the Search option Pin
Vishalagrawal19-Jan-07 1:12
Vishalagrawal19-Jan-07 1:12 
AnswerRe: How to provide the Search option Pin
Pete O'Hanlon9-Jan-07 1:32
subeditorPete O'Hanlon9-Jan-07 1:32 
QuestionByteArray To Image Pin
AB77718-Jan-07 23:57
AB77718-Jan-07 23:57 
AnswerRe: ByteArray To Image Pin
Christian Graus9-Jan-07 0:13
protectorChristian Graus9-Jan-07 0:13 
GeneralRe: ByteArray To Image Pin
AB77719-Jan-07 0:21
AB77719-Jan-07 0:21 
GeneralRe: ByteArray To Image Pin
Christian Graus9-Jan-07 0:30
protectorChristian Graus9-Jan-07 0:30 
AnswerRe: ByteArray To Image Pin
J. Dunlap9-Jan-07 0:15
J. Dunlap9-Jan-07 0:15 
You aren't saying how you converted it to a byte array to begin with. If the byte array only contains the bitmap's pixel data, it's not going to work. You have to save the full bitmap data, including the header information. You can do this by using Bitmap.Save(), passing in a MemoryStream that points to the byte array.

If you want to create a bitmap from raw pixel data (without a header), you must give GDI+/System.Drawing the information it needs in order to interpret the pixel data. You can create an empty bitmap of the right size and format, and copy the data into it using Bitmap.LockBits() and Buffer.Copy(), or you can create a bitmap that directly uses the byte array as its pixel storage - see my EditableBitmap class[^] for an example.



GeneralRe: ByteArray To Image Pin
AB77719-Jan-07 1:39
AB77719-Jan-07 1:39 
QuestionFormatting DateTime Pin
GermanDM8-Jan-07 23:47
GermanDM8-Jan-07 23:47 
AnswerRe: Formatting DateTime Pin
Christian Graus9-Jan-07 0:18
protectorChristian Graus9-Jan-07 0:18 
AnswerRe: Formatting DateTime Pin
Tyler459-Jan-07 0:18
Tyler459-Jan-07 0:18 
AnswerRe: Formatting DateTime Pin
Fedor Hajdu9-Jan-07 1:14
professionalFedor Hajdu9-Jan-07 1:14 
GeneralRe: Formatting DateTime Pin
J4amieC9-Jan-07 0:48
J4amieC9-Jan-07 0:48 
QuestionSQL-DMO. How to use JobFilter in EnumJobs method Pin
Member 6972548-Jan-07 23:05
Member 6972548-Jan-07 23:05 
QuestionManipulating controls in C#2005 Pin
Mr.Sam8-Jan-07 22:50
Mr.Sam8-Jan-07 22:50 
AnswerRe: Manipulating controls in C#2005 Pin
Stefan Troschuetz8-Jan-07 23:25
Stefan Troschuetz8-Jan-07 23:25 
GeneralRe: Manipulating controls in C#2005 Pin
Mr.Sam9-Jan-07 0:42
Mr.Sam9-Jan-07 0:42 
GeneralRe: Manipulating controls in C#2005 Pin
Stefan Troschuetz9-Jan-07 1:13
Stefan Troschuetz9-Jan-07 1:13 
AnswerRe: Manipulating controls in C#2005 Pin
V.8-Jan-07 23:32
professionalV.8-Jan-07 23:32 
AnswerRe: Manipulating controls in C#2005 Pin
Christian Graus9-Jan-07 0:31
protectorChristian Graus9-Jan-07 0:31 
AnswerRe: Manipulating controls in C#2005 Pin
Bekjong9-Jan-07 2:40
Bekjong9-Jan-07 2:40 
GeneralRe: Manipulating controls in C#2005 Pin
Mr.Sam9-Jan-07 3:13
Mr.Sam9-Jan-07 3:13 
GeneralRe: Manipulating controls in C#2005 Pin
Bekjong9-Jan-07 3:23
Bekjong9-Jan-07 3:23 
GeneralRe: Manipulating controls in C#2005 Pin
Mr.Sam9-Jan-07 3:49
Mr.Sam9-Jan-07 3:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.