c++ - Losing Part of Image When Using DrawImage on Panel -


i making winforms app hd images (1920 x 1080) displayed on panel control. images hd webcam. panels smaller (240 x 135) images , having problem getting images resize , display in panels. crash outright , other times image not resized.

the images bitmaps , redrawing them in paint event control.

here code paint event handler.

void cam0panel_paint( object^ /*sender*/, system::windows::forms::painteventargs^ e ) {     system::drawing::bitmap^ b = imagewinarray[channel_select0];     graphics^ g = e->graphics;      g->interpolationmode = system::drawing::drawing2d::interpolationmode::bilinear;     g->compositingmode = system::drawing::drawing2d::compositingmode::sourcecopy;     g->drawimage(b,system::drawing::rectangle(0,0,cam0panel->right,cam0panel->bottom)); } 

i specifying top, left point in panel (0,0) , image resized panel size. reason not working.

any appreciated.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -