Click here to Skip to main content
15,904,153 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Saving changes to bitmap file Pin
Muammar©28-Sep-08 0:18
Muammar©28-Sep-08 0:18 
QuestionTools for Team Working (like Visual Source Safe) in VS2008 Team Suite. Pin
hdv21226-Sep-08 1:44
hdv21226-Sep-08 1:44 
AnswerRe: Tools for Team Working (like Visual Source Safe) in VS2008 Team Suite. Pin
Simon P Stevens26-Sep-08 4:22
Simon P Stevens26-Sep-08 4:22 
GeneralRe: Tools for Team Working (like Visual Source Safe) in VS2008 Team Suite. Pin
hdv21226-Sep-08 7:20
hdv21226-Sep-08 7:20 
GeneralRe: Tools for Team Working (like Visual Source Safe) in VS2008 Team Suite. Pin
Simon P Stevens27-Sep-08 3:14
Simon P Stevens27-Sep-08 3:14 
QuestionImplement Undo functionality Pin
Khaleek Ahmad26-Sep-08 1:42
Khaleek Ahmad26-Sep-08 1:42 
AnswerRe: Implement Undo functionality Pin
User 665826-Sep-08 2:13
User 665826-Sep-08 2:13 
QuestionHow to load PDF file Content in Rich Text Box using C# Pin
wasimsharp26-Sep-08 1:30
wasimsharp26-Sep-08 1:30 
AnswerRe: How to load PDF file Content in Rich Text Box using C# Pin
Ashfield26-Sep-08 3:27
Ashfield26-Sep-08 3:27 
AnswerRe: How to load PDF file Content in Rich Text Box using C# Pin
John Ad26-Sep-08 6:01
John Ad26-Sep-08 6:01 
Questioni want to save a image form serialization.... Pin
maifs26-Sep-08 1:03
maifs26-Sep-08 1:03 
AnswerRe: i want to save a image form serialization.... Pin
Anthony Mushrow26-Sep-08 1:18
professionalAnthony Mushrow26-Sep-08 1:18 
GeneralRe: i want to save a image form serialization.... Pin
maifs26-Sep-08 1:46
maifs26-Sep-08 1:46 
GeneralRe: i want to save a image form serialization.... Pin
c242326-Sep-08 2:03
c242326-Sep-08 2:03 
GeneralRe: i want to save a image form serialization.... Pin
maifs26-Sep-08 2:40
maifs26-Sep-08 2:40 

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.