Link to home
Start Free TrialLog in
Avatar of selas
selas

asked on

how to show jpeg file with DBimage?

My sql databese store blob field with jpeg image
i'm using Dbctrlgrid and DB image on it
But then i open query (Select id, picture from people where id <10) i get error: 'Bitmap image not valid'
How can i show JPEG image?
Avatar of Tomas Helgi Johannsson
Tomas Helgi Johannsson
Flag of Iceland image

    Hi

I think you will the answer on this webpage : http://www.tek-tips.com/gviewthread.cfm/pid/102/qid/886254
Check out the EDBImage and QREDBImage v.1.4 on http://www.torry.net/pages.php?id=533


Regards,
  Tomas Helgi
It sounds to me like the JPeg graphic class/format is not registered.
Do you have the JPeg unit in your USES clause? Adding the JPeg unit to your uses clause will automatically register the graphic class. Try it. If it still doesn't work, let me know, I have a few other ideas...

Regards

Pierre Cornelius

ASKER CERTIFIED SOLUTION
Avatar of Mohammed Nasman
Mohammed Nasman
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rob Rietow
Rob Rietow

Is there a way to do this using SaveToStrean/Loadfromstream instead of using Savetofile? The below does not work. I am trying to get a DBImage to display in an Image

    Blobfield := fieldbyname('DeliveryPicture') as TBlobField;
    blobfield.SaveToStream(ms);
    Image4.Picture.Graphic.LoadFromStream(ms);