Click here to Skip to main content
15,920,503 members
Home / Discussions / C#
   

C#

 
GeneralRe: It can be done without a loop Pin
User 665826-Sep-08 5:28
User 665826-Sep-08 5:28 
GeneralRe: It can be done without a loop Pin
Ennis Ray Lynch, Jr.26-Sep-08 5:32
Ennis Ray Lynch, Jr.26-Sep-08 5:32 
AnswerRe: recursive Pin
Paul Conrad26-Sep-08 5:53
professionalPaul Conrad26-Sep-08 5:53 
AnswerRe: recursive Pin
Professor Sharada Ulhas26-Sep-08 6:25
Professor Sharada Ulhas26-Sep-08 6:25 
GeneralRe: recursive Pin
Paul Conrad26-Sep-08 8:42
professionalPaul Conrad26-Sep-08 8:42 
QuestionAny way to log on to a web page ? Pin
paresh_joe26-Sep-08 3:32
paresh_joe26-Sep-08 3:32 
AnswerRe: Any way to log on to a web page ? Pin
Guffa26-Sep-08 3:54
Guffa26-Sep-08 3:54 
Questionmemory usage Pin
reza assar26-Sep-08 2:21
reza assar26-Sep-08 2:21 
AnswerRe: memory usage Pin
Ashfield26-Sep-08 3:25
Ashfield26-Sep-08 3:25 
AnswerRe: memory usage Pin
Dan Neely26-Sep-08 3:55
Dan Neely26-Sep-08 3:55 
AnswerRe: memory usage Pin
Guffa26-Sep-08 4:01
Guffa26-Sep-08 4:01 
GeneralRe: memory usage Pin
reza assar26-Sep-08 13:09
reza assar26-Sep-08 13:09 
GeneralRe: memory usage Pin
Guffa26-Sep-08 15:22
Guffa26-Sep-08 15:22 
AnswerRe: memory usage Pin
Paul Conrad26-Sep-08 5:55
professionalPaul Conrad26-Sep-08 5:55 
GeneralRe: memory usage Pin
reza assar26-Sep-08 13:16
reza assar26-Sep-08 13:16 
GeneralRe: memory usage Pin
Paul Conrad26-Sep-08 13:19
professionalPaul Conrad26-Sep-08 13:19 
QuestionUsing exchange,mapi33 [c#] Pin
ugarte26-Sep-08 1:55
ugarte26-Sep-08 1:55 
QuestionSaving changes to bitmap file Pin
Muammar©26-Sep-08 1:46
Muammar©26-Sep-08 1:46 
AnswerRe: Saving changes to bitmap file Pin
Giorgi Dalakishvili26-Sep-08 2:26
mentorGiorgi Dalakishvili26-Sep-08 2:26 
AnswerRe: Saving changes to bitmap file Pin
PandemoniumPasha26-Sep-08 2:46
PandemoniumPasha26-Sep-08 2:46 
AnswerRe: Saving changes to bitmap file Pin
Guffa26-Sep-08 7:08
Guffa26-Sep-08 7:08 
GeneralRe: Saving changes to bitmap file Pin
Muammar©28-Sep-08 0:11
Muammar©28-Sep-08 0:11 
AnswerRe: Saving changes to bitmap file Pin
Dave Kreskowiak26-Sep-08 10:30
mveDave Kreskowiak26-Sep-08 10:30 
Guffa was correct. The problem is that your first line of code, Bitmap(@"C:\LEGO.jpg");, is locking, by design if the Image class Bitmap derives from, the file it loaded for the lifetime of the Bitmap object. So, to get around this limitation, you have to read the .jpg file yourself using a StreamReader, then create the Bitmap from the StreamReader object. This will prevent the file from being locked so you can Save the new image file over the old one without getting that error.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: Saving changes to bitmap file Pin
Muammar©27-Sep-08 5:02
Muammar©27-Sep-08 5:02 
GeneralRe: Saving changes to bitmap file Pin
Dave Kreskowiak27-Sep-08 11:03
mveDave Kreskowiak27-Sep-08 11:03 

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.