This works for the BMP format. Finally I have got it working. I have 
to call the 'Open' method of the dataset object of the query object. 
I was calling the 'Open' method of the dataset object which was not a 
member of the query object while trying to access the query object 
methods. Also the loadstream can be passed in to the picture.bitmap 
procedure. I will put up the sample code at by website in a day or 
two if any one is interested. Thanx anyway for all responses.

Anu Rang
http://totallyfreeenergy.freehoxt.com


--- In [email protected], "Anu Rang" <[EMAIL PROTECTED]> 
wrote:
>
> Thanks-a-heap for that. I'll give it a go and then write about the 
> outcome in a day or two. The sample DB I am using has BMP embedded 
> images. I will have to create a sample DB with JPEG to see if this 
> code works.
> 
> Regards
> Anu Rang
> http://totallyfreeenergy.freehoxt.com
> 
> 
> --- In [email protected], Zoran Milenkovic <deusdino@> 
> 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]
> >
>


Reply via email to