Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Programmers... Pin
Christian Graus28-Jul-08 12:48
protectorChristian Graus28-Jul-08 12:48 
GeneralRe: C# Programmers... Pin
happy2day28-Jul-08 12:56
happy2day28-Jul-08 12:56 
GeneralRe: C# Programmers... Pin
Paul Conrad28-Jul-08 17:49
professionalPaul Conrad28-Jul-08 17:49 
QuestionHow to navigate memory using pointers? Pin
CopperCircle28-Jul-08 11:08
CopperCircle28-Jul-08 11:08 
AnswerRe: How to navigate memory using pointers? Pin
Luc Pattyn28-Jul-08 11:17
sitebuilderLuc Pattyn28-Jul-08 11:17 
GeneralRe: How to navigate memory using pointers? Pin
CopperCircle28-Jul-08 13:57
CopperCircle28-Jul-08 13:57 
GeneralRe: How to navigate memory using pointers? Pin
Luc Pattyn28-Jul-08 14:04
sitebuilderLuc Pattyn28-Jul-08 14:04 
AnswerRe: How to navigate memory using pointers? Pin
Guffa28-Jul-08 13:58
Guffa28-Jul-08 13:58 
For a 24 bit bitmap, the location of a pixel can be calculated with:

scan0 + y * scan + x * 3

(Note that for a bitmap that is stored upside down, which is the common way, scan0 points to the last line, and scan is a negative value.)

Your code for looping the image is incomplete. The lines might not be stored end-to-end in memory, you have to skip any extra bytes between the lines (calculated by scan - x * 3). Also, if the bitmap is stored upside down, you will either get the data upside down, or only getting garbage after the first line read.

Despite everything, the person most likely to be fooling you next is yourself.

QuestionExplicitly free byte array Pin
Dudi Avramov28-Jul-08 9:18
Dudi Avramov28-Jul-08 9:18 
AnswerRe: Explicitly free byte array Pin
Luc Pattyn28-Jul-08 9:26
sitebuilderLuc Pattyn28-Jul-08 9:26 
AnswerRe: Explicitly free byte array Pin
led mike28-Jul-08 9:36
led mike28-Jul-08 9:36 
Questiontrouble with RegisterClientScriptBlock Pin
sarajo198128-Jul-08 7:14
sarajo198128-Jul-08 7:14 
AnswerRe: trouble with RegisterClientScriptBlock Pin
Christian Flutcher28-Jul-08 7:52
Christian Flutcher28-Jul-08 7:52 
AnswerRe: trouble with RegisterClientScriptBlock Pin
led mike28-Jul-08 9:07
led mike28-Jul-08 9:07 
Questionwcf question Pin
poqeqw28-Jul-08 7:10
poqeqw28-Jul-08 7:10 
AnswerRe: wcf question Pin
Mycroft Holmes28-Jul-08 20:13
professionalMycroft Holmes28-Jul-08 20:13 
QuestionFormBorderStyle Pin
netJP12L28-Jul-08 6:41
netJP12L28-Jul-08 6:41 
AnswerRe: FormBorderStyle Pin
Luc Pattyn28-Jul-08 6:47
sitebuilderLuc Pattyn28-Jul-08 6:47 
Questiondisplay records between a date range Pin
Reality Strikes28-Jul-08 6:09
Reality Strikes28-Jul-08 6:09 
AnswerRe: display records between a date range Pin
Luc Pattyn28-Jul-08 6:26
sitebuilderLuc Pattyn28-Jul-08 6:26 
GeneralRe: display records between a date range Pin
Reality Strikes28-Jul-08 7:12
Reality Strikes28-Jul-08 7:12 
GeneralRe: display records between a date range Pin
Luc Pattyn28-Jul-08 7:29
sitebuilderLuc Pattyn28-Jul-08 7:29 
GeneralRe: display records between a date range Pin
Reality Strikes28-Jul-08 7:45
Reality Strikes28-Jul-08 7:45 
GeneralRe: display records between a date range [modified] Pin
Luc Pattyn28-Jul-08 8:03
sitebuilderLuc Pattyn28-Jul-08 8:03 
AnswerRe: display records between a date range Pin
User 665828-Jul-08 8:44
User 665828-Jul-08 8:44 

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.