1,183
社区成员
发帖
与我相关
我的任务
分享
var
_Jpeg: TJPEGImage;
MS: TMemoryStream;
B: array of Byte;
i: integer;
function IntToHex(_Int: integer): string;
begin
end;
begin
if not OD.Execute then Exit;
MS := TMemoryStream.Create;
try
_Jpeg := TJPEGImage.Create;
try
_Jpeg.LoadFromFile(OD.FileName);
_Jpeg.SaveToStream(MS);
SetLength(B, MS.Size);
Move(MS.Memory^, B[0], MS.Size);
finally
_Jpeg.Free;
end;
finally
MS.Free;
end;
end;
var
PicFile : TFileStream;
Size1 : Integer;
PData1 : PByte
//是用findfirst取出值来的
Size1 := Sr.Size;
PicFile := TFileStream.Create(PicPath + Sr.Name,fmOpenRead);
PicFile.Read(PData1,Size1);//这样好象是可以保存到PData1,但是我在做为参数传入VC的一个DLL时报错了,我不知道是不是我这里保存的有问题