Hi Zoran, Thanks very much for your help. I created a JPG format database and tried the code you had posted. It worked. It is quite an elegant method and easy to do.
For BMP format 78 bytes offset hardcoded works OK. Anu Rang http://totallyfreeenergy.freehoxt.com --- In [email protected], Zoran Milenkovic <[EMAIL PROTECTED]> wrote: > > LoadJpgPic(PicDisplay,(ADOQuery1.FieldByName('Picture') as TBlobField)); > > > procedure LoadJpgPic(JpgPic:TImage; PicField:TBlobField); > var > bS : TADOBlobStream; > Pic : TJpegImage; > begin > JpgPic.Picture.Graphic:=nil; > try > bS := TADOBlobStream.Create(PicField,bmRead); > try > bS.Seek(JpegStartsInBlob(PicField),soFromBeginning); > Pic:=TJpegImage.Create; > try > Pic.LoadFromStream(bS); > JpgPic.Picture.Graphic:=Pic; > finally > Pic.Free; > end; > finally > bS.Free > end; > except end; > end; > > > Hope that helps... > > > > > --------------------------------- > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. > > [Non-text portions of this message have been removed] >

