Image image(L"TEST.jpg");//使用高质量的插补算法
graphics.SetInterpolationMode(InterpolationModeHighQualityBicubic);graphics.DrawImage(
&image,Rect(370, 30, (INT)(0.6*width), (INT)(0.6*height)));问题1:
其中的graphics怎么声明?
问题2:
我不需要把图象显示出来,只是缩小后保存缩略图。DrawImage是显示,怎么保存成文件呢?
graphics.SetInterpolationMode(InterpolationModeHighQualityBicubic);graphics.DrawImage(
&image,Rect(370, 30, (INT)(0.6*width), (INT)(0.6*height)));问题1:
其中的graphics怎么声明?
问题2:
我不需要把图象显示出来,只是缩小后保存缩略图。DrawImage是显示,怎么保存成文件呢?
Graphics g = Graphics.FromImage(bmp);
Graphics* graphics=Graphics::FromImage(&image);
graphics->SetInterpolationMode(InterpolationModeHighQualityBicubic);
graphics->DrawImage(&image,0,0,800,600);
image->Save(L"OK.JPG",&clImageClsid,NULL);原图Test.JPG是1024*768,想变成800*600的,我写了上面那段代码,可出来的图象还是1024*768的。怎么回事?谢谢!!!
Bitmap bmp = new Bitmap(600, 600);//Use image width/height instead of 600
Graphics g = Graphics.FromImage(bmp);
graphics.SetInterpolationMode(InterpolationModeHighQualityBicubic);具体怎么做啊?我现在手头儿没VC。怎么把image里的东西放进新创建的bmp里?