Subject | Blob-jpeg issues |
---|---|
Author | Ryan Nilsson-Harding <nilsson@bigpond.ne |
Post date | 2003-01-06T10:22:52Z |
Hi there,
I'm trying to have a jpg graphic field (blob) stored in my db. I've
read through this and a couple of other newsgroups and I'm on my
way, but have a coule of questions.
I can save the jpg into my db using:
tib_query.Params[0].LoadFromFile(filename);
but I cannot display the image in a TImage component successfully.
(I'm trying to display it in the AfterScroll event of the dataset)
I understand I need to stream the blob data into the TImage, but
their doesn't seem to be a
TIB_Query.FieldByName('PIC').SaveToStream method,
as I have seen suggested elsewhere.
I know I can use
TImage.Picture.SaveToFile, and then load this temp file into the
TImage, but this seems excessive to me.
I have a feeling I'm missing something small here, but I'm not too
familiar with streams yet, and I'm kinda stuck without one!
Is there a tib_query.FieldByName('PIC').SaveToStream method, or
something similar?
Rgds,
-Ryan
I'm trying to have a jpg graphic field (blob) stored in my db. I've
read through this and a couple of other newsgroups and I'm on my
way, but have a coule of questions.
I can save the jpg into my db using:
tib_query.Params[0].LoadFromFile(filename);
but I cannot display the image in a TImage component successfully.
(I'm trying to display it in the AfterScroll event of the dataset)
I understand I need to stream the blob data into the TImage, but
their doesn't seem to be a
TIB_Query.FieldByName('PIC').SaveToStream method,
as I have seen suggested elsewhere.
I know I can use
TImage.Picture.SaveToFile, and then load this temp file into the
TImage, but this seems excessive to me.
I have a feeling I'm missing something small here, but I'm not too
familiar with streams yet, and I'm kinda stuck without one!
Is there a tib_query.FieldByName('PIC').SaveToStream method, or
something similar?
Rgds,
-Ryan