先将图片写入流,再将流中的数据转储为字符串,下面的代码仅仅提供一种思路,应该有更加简洁高效的方式。procedure TForm1.Button1Click(Sender: TObject);VAR Stream:TMemoryStream; I:Integer; S,s0:String; ch:Char;begin Stream:=TMemoryStream.Create; Image1.Picture.Graphic.SaveToStream(Stream); Stream.Position:=0; SetLength(S,Stream.Size*2); while Stream.Position<Stream.Size do begin I:=Stream.Position; Stream.Read(ch,1); s0:=IntToHex(Ord(ch),2); S[I*2+1]:=s0[1]; S[I*2+2]:=s0[2]; end; Stream.free; Memo1.Lines.Text:=S;end;----------至于文本转化为图片,不多说了。毕竟就50分