Hey there folks--
I'm trying to grab a record from an advantage database backend with (supposedly) a jpg stored in a BLOB field. I use SQLEXEC() to pull the records into a table called rdata (which coverts the BLOB field to a General). Then I use the following to write the image out to disk.
I've been told that the images are stored as jpg's, but I get an "invalid format" when I try to open the disk file. Does VFP do something to the image header, or do I need to do something else before writing it to disk?
Better yet, does anyone have a link to some sort of "fingerprint" chart for image files that would let me figure out (a) if these actually are jpg files and if not, then (b) figure out which image type they are?
any help is appreciated..
thanks
-- frank~
I'm trying to grab a record from an advantage database backend with (supposedly) a jpg stored in a BLOB field. I use SQLEXEC() to pull the records into a table called rdata (which coverts the BLOB field to a General). Then I use the following to write the image out to disk.
Code:
LOCAL lcstr, lnnum
SELECT rdata
GO TOP IN rdata
COPY TO tmpTable FIELDS picture NEXT 1
lcstr=FILETOSTR("tmpTable.fpt")
IF FILE("tmpTable.fpt")
ERASE "tmpTable.fpt"
ENDIF
IF FILE("tmpTable.dbf")
ERASE "tmpTable.dbf"
ENDIF
=STRTOFILE(lcFileString, "c:\export.jpg")
I've been told that the images are stored as jpg's, but I get an "invalid format" when I try to open the disk file. Does VFP do something to the image header, or do I need to do something else before writing it to disk?
Better yet, does anyone have a link to some sort of "fingerprint" chart for image files that would let me figure out (a) if these actually are jpg files and if not, then (b) figure out which image type they are?
any help is appreciated..
thanks
-- frank~