void __fastcall TDataModule_Vision::OriginalLoadBMPFile_PNG(AnsiString filePath,
TImage *img, double r, double g, double b)
{
TPngImage *tempImg = new TPngImage();
tempImg->LoadFromFile(filePath);
SetStretchBltMode(img->Canvas->Handle, HALFTONE);
StretchBlt(img->Canvas->Handle, 0, 0, img->Width, img->Height,
tempImg->Canvas->Handle, 0, 0, tempImg->Width, tempImg->Height, SRCCOPY);
while(filePath.Pos("\\")) filePath.Delete(1, filePath.Pos("\\"));
m_filePath = filePath;
SetGrayColorInfo_PNG(tempImg, r, g, b);
delete tempImg;
}
TImage *img, double r, double g, double b)
{
TPngImage *tempImg = new TPngImage();
tempImg->LoadFromFile(filePath);
SetStretchBltMode(img->Canvas->Handle, HALFTONE);
StretchBlt(img->Canvas->Handle, 0, 0, img->Width, img->Height,
tempImg->Canvas->Handle, 0, 0, tempImg->Width, tempImg->Height, SRCCOPY);
while(filePath.Pos("\\")) filePath.Delete(1, filePath.Pos("\\"));
m_filePath = filePath;
SetGrayColorInfo_PNG(tempImg, r, g, b);
delete tempImg;
}
댓글