Click here to Skip to main content
15,911,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPrint preview and complex shaped CRgn Pin
JezzerP26-Jan-04 5:34
JezzerP26-Jan-04 5:34 
GeneralRe: Print preview and complex shaped CRgn Pin
CodeBrain26-Jan-04 23:15
CodeBrain26-Jan-04 23:15 
GeneralRe: Print preview and complex shaped CRgn Pin
JezzerP29-Jan-04 5:50
JezzerP29-Jan-04 5:50 
GeneralRe: Print preview and complex shaped CRgn Pin
CodeBrain29-Jan-04 22:10
CodeBrain29-Jan-04 22:10 
GeneralRe: Print preview and complex shaped CRgn Pin
Anonymous29-Jan-04 22:29
Anonymous29-Jan-04 22:29 
Generalimporting from Gallery Pin
act_x26-Jan-04 5:12
act_x26-Jan-04 5:12 
GeneralRe: importing from Gallery Pin
Antti Keskinen26-Jan-04 5:42
Antti Keskinen26-Jan-04 5:42 
GeneralReading pixel color values from a DIB Pin
harwanegg26-Jan-04 4:51
harwanegg26-Jan-04 4:51 
Hello out there,

i have the following problem :
I am using an Active X Image Library (Leadtools), but the methods to read pixel values are much too slow for my purpose.

For example, to read an array of 1000x1000 pixels by the function
long colour = m_Lead.GetPixel(x,y) takes almost 40 seconds. I would net a way to do it in 1 sec or less.

But, the libray allows to copy an image into a DIB very fast (less than a sec for the 1000x1000 image).

The example provided looks like this, where m_Lead1 and m_Lead2 are the image variables associated with the active X control


int MyFlags = COPY_EMPTY + COPY_DIB + COPY_PALETTE;
m_Lead1.Copy(MyFlags);
m_Lead2.Paste(0);
m_Lead2.Reverse();
OLE_HANDLE MyDib = m_Lead2.GetDIB();
m_Lead1.SetDIB(MyDib);
m_Lead1.ForceRepaint();
GlobalFree((HGLOBAL) MyDib);

My question is now, how can I read pixel color intensities from this DIB or OLE HANDLE ? My understanding of Windows bitmap handling is very limited, so a few lines of sample code would be very helpful.

Thank you very much,

ch


GeneralRe: Reading pixel color values from a DIB Pin
John R. Shaw26-Jan-04 5:59
John R. Shaw26-Jan-04 5:59 
GeneralIPersistPropertyBag question Pin
Vermithrax26-Jan-04 4:51
Vermithrax26-Jan-04 4:51 
Generalvirtual functions and dlls Pin
Achim Mueller26-Jan-04 4:51
Achim Mueller26-Jan-04 4:51 
GeneralRe: virtual functions and dlls Pin
Diddy26-Jan-04 6:17
Diddy26-Jan-04 6:17 
GeneralRe: virtual functions and dlls Pin
Achim Mueller26-Jan-04 7:00
Achim Mueller26-Jan-04 7:00 
GeneralRe: virtual functions and dlls Pin
Diddy26-Jan-04 10:41
Diddy26-Jan-04 10:41 
Generalenum type Pin
Jerome Conus26-Jan-04 4:46
Jerome Conus26-Jan-04 4:46 
GeneralRe: enum type Pin
J. Eric Vaughan26-Jan-04 5:08
J. Eric Vaughan26-Jan-04 5:08 
GeneralRe: enum type Pin
John R. Shaw26-Jan-04 6:16
John R. Shaw26-Jan-04 6:16 
Generalexcel to C++ Pin
Goh Hui Beng26-Jan-04 3:50
Goh Hui Beng26-Jan-04 3:50 
GeneralRe: excel to C++ Pin
Carlos Antollini26-Jan-04 4:02
Carlos Antollini26-Jan-04 4:02 
GeneralRe: excel to C++ Pin
Goh Hui Beng26-Jan-04 4:24
Goh Hui Beng26-Jan-04 4:24 
GeneralRe: excel to C++ Pin
David Crow26-Jan-04 4:30
David Crow26-Jan-04 4:30 
GeneralRe: excel to C++ Pin
Carlos Antollini26-Jan-04 6:39
Carlos Antollini26-Jan-04 6:39 
GeneralRe: excel to C++ Pin
Carlos Antollini26-Jan-04 6:40
Carlos Antollini26-Jan-04 6:40 
GeneralRe: excel to C++ Pin
David Crow26-Jan-04 4:29
David Crow26-Jan-04 4:29 
GeneralRe: excel to C++ Pin
mcsherry27-Jan-04 1:59
mcsherry27-Jan-04 1:59 

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.