Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I store a bmp image in a VFP table field?
Message
From
10/08/2008 16:08:58
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01337934
Message ID:
01337939
Views:
20
>Hi
>
>Can I store a bmp image in a VFP table field? if so what field type would I use? - how would I store it in the field? - how would I subsequently extract tha image again as a stand alone bmp image?

I'd recommend to keep the image outside of the table - easier to manipulate, and no memo bloat if you update the content. If you must, then check commands like Append Memo and Copy Memo (and make sure your memo fields are set with NoCpTran, i.e. as binary). Alternately, you can fill the memo with

replace mymemo with FileToStr("my.bmp")

and copy out of it with

strtofile(mymemo, "my.bmp")

Keep in mind that bmp is pretty much the only not-compressed format out there (one of the reasons why in the nineties and later the hardware sellers were smiling when you said you wanted a machine to run Windows - it took MS some time to confess there are JPG, GIF and PNG). Also, for the same reason do not use general fields, because they contain a preview of the actual content in... bmp format. Often a 5k jpg makes for a 500K general field, because it represents a large bitmap (low in detail so it compressed well).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform