Code sample | Home |
HANDLE hImgRef; int Wpix, Hpix; // our image ref. entity is marked with key = 911 hImgRef = lcDrwGetEntByKey( m_hLcDrw, 911 ); if (hImgRef){ // get image dimensions, in pixels Wpix = lcPropGetInt( hImgRef, LC_PROP_IMGREF_WPIX ); Hpix = lcPropGetInt( hImgRef, LC_PROP_IMGREF_HPIX ); Wpix = Wpix / 4; Hpix = Hpix / 4; // set new resolution lcImgRefResize( hImgRef, Wpix, Hpix, LC_IMGRES_BICUBIC ); lcEntUpdate( hImgRef ); lcWndRedraw( m_hLcWnd ); }
Before | After |