Board index » delphi » Image, JPEG and BLOB.

Image, JPEG and BLOB.

I've got a problem.

I've inserted a JPEG-format picture in a Interbase-blob field.

When I want to load this picture in an Timage-object I got the message
"Bitmap image is not valid".
The BLOB-field is declared as follows : BLOB SUB_TYPE 0 SEGMENT SIZE 80.

The problem is how to get it out of interbase and insert it into a image,
using the TImage-object of Borland.

Looking forward hearing from you.

 

Re:Image, JPEG and BLOB.


I had the same problem where I tried to load jpeg or gif from memory stream.
I soved this by this code:

var
    jpg: TJpegImage;
    SS: TStringStream;
begin
    jpg := TJpegImage.Create;
    SS := TStingStream.Create(Table.FieldByName('Image').AsString);
    try
        jpg.LoadFromStream(SS);

etc.

Quote
"it-t" <i...@it-t.nl> wrote in message news:3a0a6cc4$1_2@dnews...
> I've got a problem.

> I've inserted a JPEG-format picture in a Interbase-blob field.

> When I want to load this picture in an Timage-object I got the message
> "Bitmap image is not valid".
> The BLOB-field is declared as follows : BLOB SUB_TYPE 0 SEGMENT SIZE 80.

> The problem is how to get it out of interbase and insert it into a image,
> using the TImage-object of Borland.

> Looking forward hearing from you.

Other Threads