Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
QuestionHow to print in Windows CE Pin
Medo-I7-Sep-10 3:55
Medo-I7-Sep-10 3:55 
AnswerRe: How to print in Windows CE Pin
OriginalGriff7-Sep-10 5:29
mveOriginalGriff7-Sep-10 5:29 
QuestionCreate a virtual Directory in IIS.. Pin
Gourav Vishnoi7-Sep-10 2:54
Gourav Vishnoi7-Sep-10 2:54 
AnswerRe: Create a virtual Directory in IIS.. Pin
Blue_Boy7-Sep-10 2:57
Blue_Boy7-Sep-10 2:57 
QuestionImage corruption in picturebox Pin
Sauce!7-Sep-10 0:47
Sauce!7-Sep-10 0:47 
AnswerRe: Image corruption in picturebox Pin
OriginalGriff7-Sep-10 1:16
mveOriginalGriff7-Sep-10 1:16 
GeneralRe: Image corruption in picturebox Pin
Sauce!7-Sep-10 2:10
Sauce!7-Sep-10 2:10 
AnswerRe: Image corruption in picturebox Pin
Luc Pattyn7-Sep-10 1:48
sitebuilderLuc Pattyn7-Sep-10 1:48 
Hi,

the corruption you are seeing is typical when there is a mismatc in the image width, i.e. when scanlines are wider/narrower than the metadata indicates.

There are many ways to create a bitmap; any way that creates them from raw data requires the data to remain available as long as the image lives (i.e. isn't garbage collected), e.g.:
1. Image.FromFile() locks the file, as it may need to read the file again;
2. Image.FromStream() reqeusts the stream remains available and intact (although it often doesn't matter);
3. new Bitmap(..., rawDataPointer,...) requires the raw data to be available permanently.

1. enforces the file presence by locking the file (of course you could still get disconnected from the drive); 2 and 3 can't enforce anything, and are the likely cause for your image corruption.

BTW: all the above is in the fine manual, so RTFM.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: Image corruption in picturebox Pin
Sauce!7-Sep-10 2:12
Sauce!7-Sep-10 2:12 
GeneralRe: Image corruption in picturebox Pin
Luc Pattyn7-Sep-10 2:27
sitebuilderLuc Pattyn7-Sep-10 2:27 
QuestionHow to Unhide the Hidden form Pin
Ravindra Bisen6-Sep-10 23:36
Ravindra Bisen6-Sep-10 23:36 
AnswerRe: How to Unhide the Hidden form Pin
OriginalGriff6-Sep-10 23:44
mveOriginalGriff6-Sep-10 23:44 
AnswerRe: How to Unhide the Hidden form Pin
Luc Pattyn7-Sep-10 1:52
sitebuilderLuc Pattyn7-Sep-10 1:52 
GeneralRe: How to Unhide the Hidden form Pin
DaveyM697-Sep-10 2:04
professionalDaveyM697-Sep-10 2:04 
GeneralRe: How to Unhide the Hidden form Pin
OriginalGriff7-Sep-10 2:18
mveOriginalGriff7-Sep-10 2:18 
AnswerRe: How to Unhide the Hidden form Pin
DaveyM697-Sep-10 2:01
professionalDaveyM697-Sep-10 2:01 
GeneralRe: How to Unhide the Hidden form Pin
Hum Dum8-Sep-10 0:25
Hum Dum8-Sep-10 0:25 
GeneralRe: How to Unhide the Hidden form Pin
DaveyM698-Sep-10 1:53
professionalDaveyM698-Sep-10 1:53 
GeneralRe: How to Unhide the Hidden form Pin
DaveyM698-Sep-10 1:57
professionalDaveyM698-Sep-10 1:57 
AnswerRe: How to Unhide the Hidden form Pin
Luc Pattyn7-Sep-10 2:32
sitebuilderLuc Pattyn7-Sep-10 2:32 
QuestionSave/Load Class Pin
_Q12_6-Sep-10 19:05
_Q12_6-Sep-10 19:05 
AnswerRe: Save/Load Class Pin
SeMartens6-Sep-10 20:41
SeMartens6-Sep-10 20:41 
GeneralRe: Save/Load Class Pin
_Q12_6-Sep-10 23:28
_Q12_6-Sep-10 23:28 
GeneralRe: Save/Load Class Pin
_Q12_7-Sep-10 8:10
_Q12_7-Sep-10 8:10 
QuestionRe: Save/Load Class Pin
Ravi Bhavnani7-Sep-10 10:29
professionalRavi Bhavnani7-Sep-10 10:29 

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.