Can anyone explain what Scan0 and Stride properties of BitmapData class in C# are for?
Can anyone explain what Scan0 and Stride properties of BitmapData class in C# are
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you talking about the
BitmapDataclass? If so, the description in the documentation is reasonably clear, I think:Scan0:In other words, this lets you find the data to examine or change – or even lets you make the bitmap to a completely different piece of data.
Stride:If you want to move from one row to the next, you need to add the stride to the address of the row you’re currently looking at. Rows are aligned to 4 byte boundaries so that all kinds of code can access it more efficiently. (Various operations in CPUs are optimized to work on 4 byte or 8 byte boundaries.)