I have some bitmap on disk, which is monochrome. I need code sequence for crop some portion of this bitmap to memory. I'm don't need show bitmap on screen; I'm using VPascal and I'm limited to basic GDI (not gdi+). I try this for few days, but now I'm totaly confused. code maybe begin ... char * buffer; handle picture; long left,top,width,height; left=20;top=30;width=300;height=100; buffer = malloc((width-left)*(height-top) /8); picture= LoadImage(0,'picture.bmp,image_bitmap,0,0,LR_LOADFROMFILE | LR_CREATEDIBSECTION); ... ... ... Can someone explain rest of code or ... thanks for advice
number1: use CreateCompatibleDC to create a memory device context. then use BitBlt to copy your specifiq portion from source to newly created compatible DC. I think this will help you.