![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
jpeg to Tbitmap
zxcv © (2006-05-07 21:45:00)как jpeg картинку в Тbitmap перевести
antonn (2006-06-07 13:11:00) [1]Painkill (07.06.06 13:02) [4]
за такое казнить:)
Painkill (2006-06-07 13:02:00) [2]Вот тебе простой пример:
procedure TfrmMain.CustomItem5Click(Sender: TObject);
var
jpgImg: TJPEGImage;
begin
if OpenPictureDialog1.Execute then
imgMain.Picture.LoadFromFile(OpenPictureDialog1.FileName);
BEGIN
if SavePictureDialog.Execute then
BEGIN
// create the jpeg-graphic
jpgImg := TJPEGImage.Create;
// assign the bitmap to the jpeg, this converts the bitmap
jpgImg.Assign(imgMain.Picture.Bitmap);
// and save it to file
jpgImg.SaveToFile(ChangeFileext(SavePictureDialog.filename, '_thumb.jpg' ));
end ;
END;
END;
zxcv (2006-05-07 22:30:00) [3]спасибо
DVM (2006-05-07 21:56:00) [4]
> zxcv
Соседнюю ветку погляди
http://www.delphimaster.ru/cgi-bin/forum.pl?id=1145258401&n=7
DevilDevil (2006-05-07 21:50:00) [5]
// uses jpeg;
var
JP : TJpegImage;
B : TBitmap;
begin
JP := TJpegImage.Create;
JP.LoadFromFile('C:\Picture.jpg');
B := TBitmap.Create;
B.Assign(JP);
B.SaveToFile('C:\BMPPicture.bmp');
B.Free;
JP.Free;
end;