Click here to Skip to main content
15,913,773 members
Home / Discussions / C#
   

C#

 
GeneralRe: reading xml file to listbox Pin
Yustme9-Jan-07 1:26
Yustme9-Jan-07 1:26 
QuestionHow to provide the Search option Pin
Vishalagrawal19-Jan-07 0:12
Vishalagrawal19-Jan-07 0:12 
AnswerRe: How to provide the Search option Pin
Pete O'Hanlon9-Jan-07 0:32
mvePete O'Hanlon9-Jan-07 0:32 
QuestionByteArray To Image Pin
AB77718-Jan-07 22:57
AB77718-Jan-07 22:57 
AnswerRe: ByteArray To Image Pin
Christian Graus8-Jan-07 23:13
protectorChristian Graus8-Jan-07 23:13 
GeneralRe: ByteArray To Image Pin
AB77718-Jan-07 23:21
AB77718-Jan-07 23:21 
GeneralRe: ByteArray To Image Pin
Christian Graus8-Jan-07 23:30
protectorChristian Graus8-Jan-07 23:30 
AnswerRe: ByteArray To Image Pin
J. Dunlap8-Jan-07 23:15
J. Dunlap8-Jan-07 23: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 0:39
AB77719-Jan-07 0:39 
QuestionFormatting DateTime Pin
GermanDM8-Jan-07 22:47
GermanDM8-Jan-07 22:47 
AnswerRe: Formatting DateTime Pin
Christian Graus8-Jan-07 23:18
protectorChristian Graus8-Jan-07 23:18 
AnswerRe: Formatting DateTime Pin
Tyler458-Jan-07 23:18
Tyler458-Jan-07 23:18 
AnswerRe: Formatting DateTime Pin
Fedor Hajdu9-Jan-07 0:14
professionalFedor Hajdu9-Jan-07 0:14 
GeneralRe: Formatting DateTime Pin
J4amieC8-Jan-07 23:48
J4amieC8-Jan-07 23:48 
QuestionSQL-DMO. How to use JobFilter in EnumJobs method Pin
Member 6972548-Jan-07 22:05
Member 6972548-Jan-07 22:05 
QuestionManipulating controls in C#2005 Pin
Mr.Sam8-Jan-07 21:50
Mr.Sam8-Jan-07 21:50 
AnswerRe: Manipulating controls in C#2005 Pin
Stefan Troschuetz8-Jan-07 22:25
Stefan Troschuetz8-Jan-07 22:25 
GeneralRe: Manipulating controls in C#2005 Pin
Mr.Sam8-Jan-07 23:42
Mr.Sam8-Jan-07 23:42 
GeneralRe: Manipulating controls in C#2005 Pin
Stefan Troschuetz9-Jan-07 0:13
Stefan Troschuetz9-Jan-07 0:13 
AnswerRe: Manipulating controls in C#2005 Pin
V.8-Jan-07 22:32
professionalV.8-Jan-07 22:32 
AnswerRe: Manipulating controls in C#2005 Pin
Christian Graus8-Jan-07 23:31
protectorChristian Graus8-Jan-07 23:31 
AnswerRe: Manipulating controls in C#2005 Pin
Bekjong9-Jan-07 1:40
Bekjong9-Jan-07 1:40 
GeneralRe: Manipulating controls in C#2005 Pin
Mr.Sam9-Jan-07 2:13
Mr.Sam9-Jan-07 2:13 
GeneralRe: Manipulating controls in C#2005 Pin
Bekjong9-Jan-07 2:23
Bekjong9-Jan-07 2:23 
GeneralRe: Manipulating controls in C#2005 Pin
Mr.Sam9-Jan-07 2:49
Mr.Sam9-Jan-07 2: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.