Q
qinmingzsj
Unregistered / Unconfirmed
GUEST, unregistred user!
我的讀取原代碼如下﹕
var imagestream: TMemoryStream;
jpg: TJPEGImage;
begin
try
jpg := TJPEGImage.Create;
imagestream := TMemoryStream.Create;
if not GSDQINDataModule.Qry_GS_MAKEHEAD.FieldByName('PICTURE').IsNull then
begin
TBlobField(GSDQINDataModule.Qry_GS_MAKEHEAD.FieldByName('PICTURE')).SaveToStream(imagestream);
jpg.LoadFromStream(imagestream);
Image_PICTURE.Picture.Assign(jpg);
imagestream.Free;
end;
except
end;
end;
我的保存原代碼如下﹕
var imagestream: TMemoryStream;
jpg: TJPEGImage;
begin
jpg := TJPEGImage.Create;
imagestream := TMemoryStream.Create;
jpg.Assign(GSDMAKEFRM.Image_PICTURE.Picture);
jpg.SaveToStream(imagestream);
TBlobField(Qry_GS_MAKEHEAD.FieldByName('picture')).LoadFromStream(imagestream);
end;
imagestream.Free;
jpg.Free;
end;
但是每次我讀取 時都提示我"JPEG ERROR #41 "
請哪位高手指教﹗
var imagestream: TMemoryStream;
jpg: TJPEGImage;
begin
try
jpg := TJPEGImage.Create;
imagestream := TMemoryStream.Create;
if not GSDQINDataModule.Qry_GS_MAKEHEAD.FieldByName('PICTURE').IsNull then
begin
TBlobField(GSDQINDataModule.Qry_GS_MAKEHEAD.FieldByName('PICTURE')).SaveToStream(imagestream);
jpg.LoadFromStream(imagestream);
Image_PICTURE.Picture.Assign(jpg);
imagestream.Free;
end;
except
end;
end;
我的保存原代碼如下﹕
var imagestream: TMemoryStream;
jpg: TJPEGImage;
begin
jpg := TJPEGImage.Create;
imagestream := TMemoryStream.Create;
jpg.Assign(GSDMAKEFRM.Image_PICTURE.Picture);
jpg.SaveToStream(imagestream);
TBlobField(Qry_GS_MAKEHEAD.FieldByName('picture')).LoadFromStream(imagestream);
end;
imagestream.Free;
jpg.Free;
end;
但是每次我讀取 時都提示我"JPEG ERROR #41 "
請哪位高手指教﹗