Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extract picture data from memo field.
Message
De
24/07/2002 02:45:55
Walter Meester
HoogkarspelPays-Bas
 
 
À
23/07/2002 13:50:04
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Divers
Thread ID:
00681802
Message ID:
00681928
Vues:
12
Hi Mike,

I recall that in the past this indeed was a 10 byte pointer. If I recall directly it contained a pointer to the location into the memo file, length and a codepage identifier. This has changed in VFP. The field now only contains a pointer. The length of the memo field is stored as the first 4 bytes in the memofield. I'm not sure where the codepage is stored however. It might be also at the beginning of the memofield, or it might be in the tableheader.

Not, having any experience with this matter, here some thoughts. The pointer might be a regular [unsigned long] pointer though it might be either stored in a most - least significant bit or reversed order. Also the memofile has got a 512 byte header which could or could not included into the pointer. Last but not least, the BLOCKSIZE of the memofile could act as a multiplier to get the actual filepointer.

Walter,

>Hi All
>
>A colleague and I are thinking about extracting data into a stream. This results from the fact that CursorToXML doesn't support general fields. Last night we looked at the structure of the memo field. We're using a BMP picture which was displayed using MS Paint.
>
>The VFP docs explained some stuff, but we couldn't confirm this information. The docs say the general field holds a 10 byte pointer into the memo file (.FPT). Looking at the DBF with a Hex Editor, it seems this is a 4 byte number. We couldn't decode this number. Can someone help with that?
>
>The size of the image file is stored in the memo file. I know its MSB, LSB formatted, but converting this from Hex to Decimal didn't return the byte size of the file as reported by the OS.
>
>Basically, we want to return the picture as a stream of bytes from the memo field. This involves locating the data first and then reading it, probably using FOPEN/FREAD().
>
>Thanks!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform