By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,973 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,973 IT Pros & Developers. It's quick & easy.

About unsafe Image processing

P: n/a
Hi.

I use System.Drawing.Bitmap to work with bitmaps.
I use LockBits to retrieve a BitmapData which in turn provides me with the
Scan0 property which i then use to loop the pixel data using byte *.
I am aware of that internally GDI+ stores RGB as BGR,
therefore i have to to a manual swap for the R and B components of each
pixel.
This works when the image contains no alpha channel,
but when an alpha channel is present (Format32bppArgb)
i wonder where in that four element array that alpha is stored?
I cant get it right.

One more thing;
I am not actually manipulating the pixels, what i really want to do is to
copy
the pixel data into a byte array containing the scan lines queued after each
other
in R,G,B format.
But since GDI+ internally stores the components in BGR order, there is'nt a
way to copy the entire pixel data
directly without looping the pixels, is'nt it?

Thank you!
MVH Dennis
Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.