首先通过Tcanvas画布的Textout方法将文本输出到画布上,然后使用Timage对象中Picture<br>属性的SavetoFile方法保存为图像。<br>//加上ExtCtrls 单元<br>var<br> C_image: TImage;<br> i: integer;<br>begin<br> C_image:=Timage.Create(nil);<br> C_image.width:=richedit.width;<br> C_image.Height:=richedit.Height;<br> for i:=0 to richedit.lines.Count-1 do<br> begin <br> C_image.Canvas.Testout( 0,i*12, richedit.Lines.Strings);<br> end;<br> C_image.Picture.SavetoFile([文件名]);<br> C_image.free;<br>end;