Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extracting Graphic Images from Embedded General Fields
Message
From
10/03/1999 12:20:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/03/1999 11:47:44
Thierry Yuen
Stantec Architecture Ltd.
Calgary, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
00195892
Message ID:
00195920
Views:
28
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform