Kymberley
asked on
displaying graphic from blob field
In d3 I had a form with a dbimage control connected to a blob/memo field in an apollo Taptable
ie dbimage is a tdbimage
datasource is the datasource connected to the database containing the bitmaps in its memofield - "image"
i rerieve the size of the image using
ih:=dbimage1.picture.Graph ic.height;
iw:=dbimage1.picture.Graph ic.width;
then display this in a tpaintbox using (via a few subroutines)
paintbox1.canvas.stretchdr aw(rect(i, j,i+ih,j+i w),dbimage 1.picture. graphic);
the form was converted to D7 with the aptable replaced by a Tapollotable but otherwise essentially the same.
using the same database for the two programs i find that the values of ih and iw are 0 in the D7 case and no image is displayed.
even manually overriding the size variables just displays an empty rectangle.
I tried to change the D7 version to us a timage rather than a tdbimage but can't work out have to assign the image in the blob field to the image control.
Any ideas why the d3 code doesn't wrk in D7 or how to work around it?
Thanks
Kymberley
ie dbimage is a tdbimage
datasource is the datasource connected to the database containing the bitmaps in its memofield - "image"
i rerieve the size of the image using
ih:=dbimage1.picture.Graph
iw:=dbimage1.picture.Graph
then display this in a tpaintbox using (via a few subroutines)
paintbox1.canvas.stretchdr
the form was converted to D7 with the aptable replaced by a Tapollotable but otherwise essentially the same.
using the same database for the two programs i find that the values of ih and iw are 0 in the D7 case and no image is displayed.
even manually overriding the size variables just displays an empty rectangle.
I tried to change the D7 version to us a timage rather than a tdbimage but can't work out have to assign the image in the blob field to the image control.
Any ideas why the d3 code doesn't wrk in D7 or how to work around it?
Thanks
Kymberley
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
TBlobField(Dataset.FieldBy
Then see if it generates a file of more than 0 bytes and if the image is really a valid image.