L luoqiang1234 Unregistered / Unconfirmed GUEST, unregistred user! 2003-05-05 #1 我想做一个直接在JPG图像中加入文字说明的程序,但DELPHI只支持在BMP图像中编辑, 即使在图像中加入文字也无法保存为JPG格式!!! 怎么办??!!请各位指教
远 远帆 Unregistered / Unconfirmed GUEST, unregistred user! 2003-05-05 #2 var TmpJpeg: TJpegImage; begin TmpJpeg:=TJPEGImage.Create; TmpJpeg.LoadFromFile('金色花瓣.jpg'); Image1.Picture.Bitmap.Assign(TmpJpeg); Image1.Canvas.TextOut(0,0,'测试字符串'); TmpJpeg.Assign(Image1.Picture.Bitmap); TmpJpeg.SaveToFile('a.jpg'); TmpJpeg.Free; end;
var TmpJpeg: TJpegImage; begin TmpJpeg:=TJPEGImage.Create; TmpJpeg.LoadFromFile('金色花瓣.jpg'); Image1.Picture.Bitmap.Assign(TmpJpeg); Image1.Canvas.TextOut(0,0,'测试字符串'); TmpJpeg.Assign(Image1.Picture.Bitmap); TmpJpeg.SaveToFile('a.jpg'); TmpJpeg.Free; end;