how to show jpeg file with DBimage?

Posted on 2004-08-13
Last Modified: 2013-11-19
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?
Question by:selas
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 11794185

I think you will the answer on this webpage :
Check out the EDBImage and QREDBImage v.1.4 on

  Tomas Helgi
LVL 14

Expert Comment

by:Pierre Cornelius
ID: 11794532
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...


Pierre Cornelius

LVL 22

Accepted Solution

Mohammed Nasman earned 500 total points
ID: 11797527
Hello selas

  DBImage doesn't support Jpeg format, but you can find other DBImage components that support that, I tried few free ones, but have problems with them, so I changed to use Image component which is easy to use for showing any images from database

Here's a sample for showing the images from AdoQuery on DBCtrlGrid, without needing to any other components just drop Image component into the DBCtrlGrid, write few lines for DBCtrlGrid OnPainPanel event, and every thing will work fine ;-)


procedure TForm2.DBCtrlGrid1PaintPanel(DBCtrlGrid: TDBCtrlGrid;
  Index: Integer);


Mohammed Nasman

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
delphi exception 7 61
Simple 3D CAD 18 101
RGB code colors 8 99
I need help embedding Base64 Images using VB.Net - When image is a .jpg 2 39
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this Micro Tutorial viewers will learn the basic shortcuts and functions in InDesign.
In this Micro Tutorial viewers will learn how to remove an unwanted object using Photoshop’s feature known as content-aware fill.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now