Posted on 2007-04-22 17:46
semovy 阅读(398)
评论(1) 编辑 收藏 所属分类:
C++ Builder相关
Graphics::TBitmap *bmp = new Graphics::TBitmap;
bmp->Width = (int)newWidth;
bmp->Height = (int)newHeight;
bmp->Canvas->StretchDraw(Rect(0,0,bmp->Width,bmp->Height),Image1->Picture->Graphic);
TJPEGImage *MyJPEG = new TJPEGImage;
MyJPEG->Assign(bmp);
MyJPEG->SaveToFile("c:\\newbmp.jpg");
delete MyJPEG;
delete bmp;