Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting image to binary data???
Message
From
03/12/2004 14:56:51
 
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00966671
Message ID:
00966812
Views:
6
Hi Dave. Just curious -

1) how many images do you want to store, max.

2) what is the size of the largest image, max.

Later



>Hi Jos,
>
>Yes, the fpt file bloat is huge, especially when storing images to a general field. I created an image storage system years ago, which stores images in general fields. However, the fpt bloat is too extreme. I wanted to keep the images within the fpt file at that time, since it seemed like it had some advantages for the end-user. I was aware of the bloat issue, but I wanted to store the images within the database, to provide some minimal security. I would still like to do this with the update I'm building, but there are many issues involved, especially if I store the images as raw binary data in a memo field. I would need to convert the binary data back into picture files every time the user wanted to view the images, which may not be very efficient. I know this can easily be done, but it may defeat some of the minimal security features I had in mind. In the end, I may need to just store the images on the hard drive, as you mentioned. Besides, there is better security in using the
>windows encryption system
>
>I did a little experimenting, and storing the raw binary data in a memo field does not bloat in the same way that a general field bloats. The picture preview component in general fields, is what apparently causes the extreme fpt bloating. On the other hand, storing raw binary data in memo fields seems to inflate the fpt file only in direct proportion to the size fo the original picture file (which is much more acceptable than what happens with general fields). However, there is the 2GB limitation, which could be a problem even when using memo fields. Picture files vary quite a bit in size. Some are very small (17kb) and others are very large (1MB or more).
>
>Dave
>
>
>>Hi Dave. You can store any binary data into binary memo fields. You can write binary memo fields out to disk. Also check out FILETOSTR() and STRTOFILE() functions amongst others. Be aware of memo file bloat - updating the memo field of the same record creates "bloat" and will add excess size to the FPT file. Will you be updating these memo fields? Also, note that the memo file (and VFP file) has a max size of 2Gb. What is the average size of your images and how many do you want to save? The usual technique is to leave the images on disk and use a char field to hold the drive+path to the image.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform