L
lsh998
Unregistered / Unconfirmed
GUEST, unregistred user!
请教:<br>各位大哥怎么把 bmp ,gif 图片转换为二进制?<br>然后把 二进制 字符串转换 为 bmp ,gif 图片<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> mystream: TStream;<br> I: Integer;<br> mybyte: Byte;<br> mystr: string;<br>begin<br> mystream := TMemoryStream.Create;<br> if Opendialog1.Execute then<br> begin<br> TMemoryStream(mystream).LoadFromFile(Opendialog1.FileName);<br> end;<br> image1.Picture.Bitmap.LoadFromStream(mystream);<br> mystream.Position := 0;<br> for I := 1 to mystream.Size do<br> begin<br> Application.ProcessMessages;<br> mystream.Read(mybyte, 1);<br> mystr := mystr+IntToHex(mybyte,2);<br> if ((I mod 14) = 0) then<br> begin<br> Memo1.Lines.Add(mystr);<br> mystr := '';<br> end;<br> end;<br> mystream.Free;<br>end;<br><br><br>这是一个把 BMP 图片转换为 二进制的程序(网上找的)<br><br>各位大哥,可以给我其他三个程序吗?<br><br>谢谢!