Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

To avoid lockbits

3 views
Skip to first unread message

pro-grammer

unread,
Aug 5, 2009, 3:24:01 AM8/5/09
to
Hi,

My goal is to load an image as a bmp and get to its pixels. So what i
do is:

Bitmap::FromFile(<filename>); // i guess this loads the file as a bmp
LockBits(...); // this coppies the bitmap's bits into another buffer
//now i can use the pixels

Is there any way to avoid the extra copy at LockBits(which is
expensive)? I want direct access to the bits loaded from the file. Is
there any way to do this in mfc/.net?

0 new messages