Board index » delphi » Using TDBImage with JPEGS?

Using TDBImage with JPEGS?

Hello.  I am trying to get a TDBImage control to show a jpeg from a BLOB
field in a database.  An error box informs me that the Bitmap image is not
valid.  I know its not a bitmap but the help says that the TDBImage controls
can handle other graphic objects and I assume it can do JPEGS.

Could anyone please tell me how to use the TBDImage to show jpegs from a
database?

Thank you in advance.

Ian Edmond.

 

Re:Using TDBImage with JPEGS?


What version of Delphi are you using?

I don't know if it's different, but with Delphi 4, it seems to work if
you have "jpeg" in your uses clause.

On Sun, 29 Apr 2001 17:28:19 +0100, "Ian Edmond"

Quote
<Ian.Edm...@YourWork.fsnet.co.uk> wrote:
>Hello.  I am trying to get a TDBImage control to show a jpeg from a BLOB
>field in a database.  An error box informs me that the Bitmap image is not
>valid.  I know its not a bitmap but the help says that the TDBImage controls
>can handle other graphic objects and I assume it can do JPEGS.

>Could anyone please tell me how to use the TBDImage to show jpegs from a
>database?

>Thank you in advance.

>Ian Edmond.

Re:Using TDBImage with JPEGS?


I am using Delphi 4.0.  I tried putting jpeg in the uses clause with no
success.  Either way I can copy a jpeg from the clipboard to the TDBImage
but can't get the jpeg BLOB to go in there.
The database is DBISAM.

Quote
Gurble <gurbleREM...@THISclear.net.nz> wrote in message

news:1u4qetc78qc8qnlv6olnhgr8j8q6jubev7@4ax.com...
Quote

> What version of Delphi are you using?

> I don't know if it's different, but with Delphi 4, it seems to work if
> you have "jpeg" in your uses clause.

> On Sun, 29 Apr 2001 17:28:19 +0100, "Ian Edmond"
> <Ian.Edm...@YourWork.fsnet.co.uk> wrote:

> >Hello.  I am trying to get a TDBImage control to show a jpeg from a BLOB
> >field in a database.  An error box informs me that the Bitmap image is
not
> >valid.  I know its not a bitmap but the help says that the TDBImage
controls
> >can handle other graphic objects and I assume it can do JPEGS.

> >Could anyone please tell me how to use the TBDImage to show jpegs from a
> >database?

> >Thank you in advance.

> >Ian Edmond.

Re:Using TDBImage with JPEGS?


Quote
"Ian Edmond" <Ian.Edm...@YourWork.fsnet.co.uk> wrote in message

news:9ci9qn$156$1@newsg3.svr.pol.co.uk...

Quote
> Hello.  I am trying to get a TDBImage control to show a jpeg from a BLOB
> field in a database.  An error box informs me that the Bitmap image is not
> valid.  I know its not a bitmap but the help says that the TDBImage
controls
> can handle other graphic objects and I assume it can do JPEGS.

> Could anyone please tell me how to use the TBDImage to show jpegs from a
> database?

TDBImage is capable to work with bitmap format only
TJPEGImage can help you.
There is an example in Delphi.

TJPEGImage encapsulates a JPEG graphic.
Unit
jpeg

Description
Use TJPEGImage to read and write JPEG compressed image data.

Other Threads