>I have a database with a large number of embedded graphic files that I would like to extract and save as a separate graphic image (bmp). I'm not sure how to automate this using v2.6 commands. Any suggestions?
>
>Thanks
>
>Thierry
Hi Thierry,
Here is what I remember from MS KB :
- Select gen field of one record to a temp table so its fpt contains only one gen field for one rec.
- Lowlevel open new fpt and copy bytes starting at offsett 599 to a .bmp file.
handle=fopen("mynew.fpt")
handleout = fcreate("mynew.bmp")
=fseek(handle,599)
=fwrite(handleout,fread(handle),65535)
=fclose(handle) and fclose(handleout)
Roughly.
- Erase new table.
KB says that this might not work for pictures put in with Copy&Paste and the FPT content might be a duplicate size of real BMP.
If you could have it working effective, an enhanced version might open original the dbf and fpt lowlevel and get block numbers from dbf, seek to block in fpt and extract to BMP. It would work faster than copying to a separate table per record first I think.
Cetin