Click here to Skip to main content
16,004,944 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can I create a binary buffer of an image from a file? Pin
Judah Gabriel Himango28-Dec-05 4:27
sponsorJudah Gabriel Himango28-Dec-05 4:27 
GeneralRe: How can I create a binary buffer of an image from a file? Pin
leppie28-Dec-05 6:49
leppie28-Dec-05 6:49 
GeneralRe: How can I create a binary buffer of an image from a file? Pin
Judah Gabriel Himango28-Dec-05 7:09
sponsorJudah Gabriel Himango28-Dec-05 7:09 
GeneralRe: How can I create a binary buffer of an image from a file? Pin
S. Senthil Kumar28-Dec-05 19:31
S. Senthil Kumar28-Dec-05 19:31 
GeneralRe: How can I create a binary buffer of an image from a file? Pin
Judah Gabriel Himango29-Dec-05 4:13
sponsorJudah Gabriel Himango29-Dec-05 4:13 
GeneralRe: How can I create a binary buffer of an image from a file? Pin
thomasa28-Dec-05 22:04
thomasa28-Dec-05 22:04 
AnswerRe: How can I create a binary buffer of an image from a file? Pin
leppie28-Dec-05 6:51
leppie28-Dec-05 6:51 
AnswerRe: How can I create a binary buffer of an image from a file? Pin
Dave Kreskowiak28-Dec-05 8:08
mveDave Kreskowiak28-Dec-05 8:08 
Like leppie said:
// Open a filestream on "C:\MyImage.gif" for Read/Write.
FileStream templateStream = File.Open(@"C:\MyImage.gif", FileMode.Open);
 
// Create an array of bytes with every element initialized to 0.
buffer = new byte[templateStream.Length];
 
// WRITE the array of 0's to the file!!!  :wtf:
templateStream.Write(buffer, 0, (int)templateStream.Length);

Shouldn't that be READ??? In either case, the file has already been destroyed when you ran this code for the first time. You'll have to correct the code to Read, then replace the .GIF file with a known good copy.



RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

QuestionIm having a problem with this Icon class Pin
imsathy28-Dec-05 2:15
imsathy28-Dec-05 2:15 
AnswerRe: Im having a problem with this Icon class Pin
Robert Rohde28-Dec-05 5:45
Robert Rohde28-Dec-05 5:45 
GeneralRe: Im having a problem with this Icon class Pin
imsathy28-Dec-05 18:57
imsathy28-Dec-05 18:57 
QuestionDataBind Issue Pin
HolyGrandFather28-Dec-05 1:57
HolyGrandFather28-Dec-05 1:57 
AnswerRe: DataBind Issue Pin
albCode28-Dec-05 2:35
albCode28-Dec-05 2:35 
GeneralRe: DataBind Issue NO LUCK Pin
HolyGrandFather28-Dec-05 3:05
HolyGrandFather28-Dec-05 3:05 
GeneralRe: DataBind Issue NO LUCK Pin
albCode28-Dec-05 3:35
albCode28-Dec-05 3:35 
QuestionHow to disable close and resize button in c#.net application Pin
Malayil alex28-Dec-05 0:41
Malayil alex28-Dec-05 0:41 
AnswerRe: How to disable close and resize button in c#.net application Pin
albCode28-Dec-05 0:54
albCode28-Dec-05 0:54 
AnswerRe: How to disable close and resize button in c#.net application Pin
Luis Alonso Ramos28-Dec-05 5:56
Luis Alonso Ramos28-Dec-05 5:56 
AnswerRe: How to disable close and resize button in c#.net application Pin
imsathy29-Dec-05 1:53
imsathy29-Dec-05 1:53 
Questionhelp regarding redirecting consol I/O in c# app. Pin
musmanafzal28-Dec-05 0:32
musmanafzal28-Dec-05 0:32 
AnswerRe: help regarding redirecting consol I/O in c# app. Pin
Judah Gabriel Himango28-Dec-05 4:44
sponsorJudah Gabriel Himango28-Dec-05 4:44 
QuestionHow to disable SAVE,PRINT options in MS OFFICE using WINDOWS API's Pin
pradpb99927-Dec-05 22:17
pradpb99927-Dec-05 22:17 
AnswerRe: How to disable SAVE,PRINT options in MS OFFICE using WINDOWS API's Pin
Judah Gabriel Himango28-Dec-05 4:32
sponsorJudah Gabriel Himango28-Dec-05 4:32 
QuestionSockets Pin
HakunaMatada27-Dec-05 22:11
HakunaMatada27-Dec-05 22:11 
AnswerRe: Sockets Pin
KaptinKrunch28-Dec-05 2:30
KaptinKrunch28-Dec-05 2:30 

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.