Click here to Skip to main content
15,909,737 members
Home / Discussions / C#
   

C#

 
AnswerRe: Problem with 2 forms Pin
thrakazog3-Jul-07 7:37
thrakazog3-Jul-07 7:37 
QuestionContrast solutions for drawing text and lines onto an image Pin
Jon Hulatt3-Jul-07 5:07
Jon Hulatt3-Jul-07 5:07 
AnswerRe: Contrast solutions for drawing text and lines onto an image Pin
Dario Solera3-Jul-07 7:16
Dario Solera3-Jul-07 7:16 
AnswerRe: Contrast solutions for drawing text and lines onto an image Pin
Luc Pattyn3-Jul-07 7:31
sitebuilderLuc Pattyn3-Jul-07 7:31 
QuestionSuppress "CAPS Lock is ON" warning in Windows XP Pin
Subrahmanyam K3-Jul-07 4:52
Subrahmanyam K3-Jul-07 4:52 
AnswerRe: Suppress "CAPS Lock is ON" warning in Windows XP Pin
Dario Solera3-Jul-07 7:08
Dario Solera3-Jul-07 7:08 
QuestionReading a Bitmap in Unsafe vs InteropServices.Marshall Pin
PhilDanger3-Jul-07 4:40
PhilDanger3-Jul-07 4:40 
AnswerRe: Reading a Bitmap in Unsafe vs InteropServices.Marshall Pin
Jon Hulatt3-Jul-07 5:31
Jon Hulatt3-Jul-07 5:31 
You'll have to account for stride manually, but there is nothing to this.

The Marshal.Copy() method just copy blocks of data.

If Stride and (Width * BytesPerPixel) are not equal, then the data at the end of each image row is padded with zeros.

This doesn't matter. Make sure you allocate a byte [] array of size = height * stride, and use marshal.copy to fill it.

Use nested loops to avoid any stride difference:-

for (y=0; y<height; y++)
{
  for (x=0; x < width; x++)
  {
      int offset = (y * stride) + (x * BytesPerPixel);
      if (pixels[offset] == black)
           // a black pixel
  } 

}


using System.Beer;

GeneralRe: Reading a Bitmap in Unsafe vs InteropServices.Marshall Pin
PhilDanger3-Jul-07 5:53
PhilDanger3-Jul-07 5:53 
GeneralRe: Reading a Bitmap in Unsafe vs InteropServices.Marshall Pin
Luc Pattyn3-Jul-07 6:35
sitebuilderLuc Pattyn3-Jul-07 6:35 
QuestionReading a remote mp3 file for file size and length Pin
mfmaneef3-Jul-07 4:25
mfmaneef3-Jul-07 4:25 
AnswerRe: Reading a remote mp3 file for file size and length Pin
Judah Gabriel Himango3-Jul-07 5:20
sponsorJudah Gabriel Himango3-Jul-07 5:20 
GeneralRe: Reading a remote mp3 file for file size and length Pin
mfmaneef3-Jul-07 5:31
mfmaneef3-Jul-07 5:31 
GeneralRe: Reading a remote mp3 file for file size and length Pin
Judah Gabriel Himango3-Jul-07 5:47
sponsorJudah Gabriel Himango3-Jul-07 5:47 
GeneralRe: Reading a remote mp3 file for file size and length Pin
mfmaneef3-Jul-07 6:28
mfmaneef3-Jul-07 6:28 
GeneralRe: Reading a remote mp3 file for file size and length Pin
Judah Gabriel Himango3-Jul-07 9:05
sponsorJudah Gabriel Himango3-Jul-07 9:05 
QuestionCompilation Error with Resource strings Pin
jayart3-Jul-07 3:46
jayart3-Jul-07 3:46 
AnswerRe: Compilation Error with Resource strings Pin
Judah Gabriel Himango3-Jul-07 4:33
sponsorJudah Gabriel Himango3-Jul-07 4:33 
GeneralRe: Compilation Error with Resource strings Pin
jayart3-Jul-07 4:40
jayart3-Jul-07 4:40 
GeneralRe: Compilation Error with Resource strings Pin
Judah Gabriel Himango3-Jul-07 5:19
sponsorJudah Gabriel Himango3-Jul-07 5:19 
GeneralRe: Compilation Error with Resource strings Pin
jayart3-Jul-07 5:29
jayart3-Jul-07 5:29 
GeneralRe: Compilation Error with Resource strings Pin
Judah Gabriel Himango3-Jul-07 5:48
sponsorJudah Gabriel Himango3-Jul-07 5:48 
QuestionCan I create a continoues database form Pin
Muhammad Gouda3-Jul-07 3:39
Muhammad Gouda3-Jul-07 3:39 
QuestionC# Threading Gurus input needed (FileSystemWatcher ) Pin
mejax3-Jul-07 3:38
mejax3-Jul-07 3:38 
AnswerRe: C# Threading Gurus input needed (FileSystemWatcher ) Pin
Judah Gabriel Himango3-Jul-07 4:30
sponsorJudah Gabriel Himango3-Jul-07 4:30 

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.