Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Drawing / May 2008

Tip: Looking for answers? Try searching our database.

Exception in Bitmap.Save

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ramendra Kotharkar - 02 May 2008 08:09 GMT
I am facing some problem in Bitmap.Save function...
Here is the scenario:
- Create a bitmap image A from a bitmap file
- Create a bitmap image B with same attributes as bitmap image A
- Get BitmapData using LockBits on bitmap image B
- Read the bytes information of bitmap A
- Copy bytes information to BitmapData (of bitmap B) using Marshal.Copy
- UnlockBits BitmapData of bitmap image B
- Update palette information of bitmap image B
- Clone bitmap image B to bitmap image C
- Save bitmap image C to a file over a network using Bitmap.Save

During save operation an exception is thrown "Attempted to read-write
protected memory..."

This happens only sometimes otherwise works without problem.

Any help is appreciated!

Ramendra
MichaelC - 08 May 2008 03:33 GMT
>I am facing some problem in Bitmap.Save function...
> Here is the scenario:
[quoted text clipped - 14 lines]
>
> Any help is appreciated!

I think we'd need to see the exact code. Can you make the *simplest*
possible code that demonstrates the problem?

Michael

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.