agent/browser/ie/pagetest/PagetestReporting.cpp
/*-----------------------------------------------------------------------------
	Save out one of the intermediate screen shots
-----------------------------------------------------------------------------*/
Save out one of the intermediate screen shots
Save out one of the intermediate screen shots
void CPagetestReporting::SaveProgressImage(CxImage &img, CString file, bool resize, DWORD quality)
{
	if( img.IsValid() )
	{
		CxImage img2(img);
		if( resize )
			img2.Resample2(img.GetWidth() / 2, img.GetHeight() / 2);
		img2.SetCodecOption(8, CXIMAGE_FORMAT_JPG);	
		img2.SetCodecOption(16, CXIMAGE_FORMAT_JPG);	
		img2.SetJpegQuality((BYTE)min(quality, 100));
		img2.Save(file, CXIMAGE_FORMAT_JPG);
	}
}
void CPagetestReporting :: SaveProgressImage ( CxImage & img , CString file , bool resize , DWORD quality ) { if ( img . IsValid ( ) ) { CxImage img2 ( img ) ; if ( resize ) img2 . Resample2 ( img . GetWidth ( ) / 2 , img . GetHeight ( ) / 2 ) ; img2 . SetCodecOption ( 8 , CXIMAGE_FORMAT_JPG ) ; img2 . SetCodecOption ( 16 , CXIMAGE_FORMAT_JPG ) ; img2 . SetJpegQuality ( ( BYTE ) min ( quality , 100 ) ) ; img2 . Save ( file , CXIMAGE_FORMAT_JPG ) ; } }
Save out one of the intermediate screen shots
Save out one of the intermediate screen shots
// shrink the image down
 // save it out
 // optimized encoding
 // progressive
