"Marcio dalmolin" <✉navebrazil.com.br> wrote in message news:✉newsgroups.borland.com...
> Please, does anybody know how to solve this error ? I'm trying to load a > jpeg image from Oracle table 8i. > > procedure TForm1.Button1Click(Sender: TObject); > var > MemStrm: TMemoryStream; > Jpg: TJPEGImage; > begin > If Table1Foto.IsNull then > begin > Image1.Picture.Assign(nil); > Abort; > end; > Jpg:=TJPEGImage.Create; > try > MemStrm:=TMemoryStream.Create; > try > Table1Foto.SaveToStream(MemStrm); > MemStrm.Seek(0,soFromBeginning); > with Jpg do > begin > PixelFormat:=jf24Bit; > Scale:=jsEighth; > GrayScale:=False; > Performance:=jpBestQuality; > ProgressiveDisplay:=True; > ProgressiveEncoding:=True; > LoadFromStream(MemStrm); > end; > Image1.Picture.Assign(Jpg); > finally > MemStrm.Free; > end; > finally > Jpg.Free; > end; > end; > > > When I execute, I always get error message 'Jpeg error #53'. How do I > resolve it ?
Try saving the content of MemStrm to file and see if that file is a valid jpeg.
Igor