Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use .jpeg files for OLEbound picture?
Message
 
À
28/01/2009 14:36:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01377782
Message ID:
01377820
Vues:
29
>>>>>I have a table RESIDENT.dbf with picture embedded in a general type field Resimage.
>>>>>Command "APPEND GENERAL resimage FROM (picturefile)" is used to embed resident's picture.
>>>>>It works pretty good for .BMP pictures. However, .BMP files are much larger than .JPEG files.
>>>>>Embedded JPEG images are not displayed on form - just file name
>>>>>I tried to convert .JPG into .BMP, but the size of picture file became huge.
>>>>>How to use JPEG files in OLEbound image control?
>>>>>
>>>>>Thanks
>>>>>
>>>>>Ed
>>>>
>>>>First:
>>>>DO NOT EVER USE GENERAL Field type, NEVER!!!!
>>>>That is mandatory :-)
>>>>When you insert into General field VFP keeps not only file, but the current user default application which handles that kind of files.
>>>>I remember we have problems even with BMP, because on my computer I have a Microsoft Imaging installed, but on others only Paint was available.
>>>>
>>>>
>>>>Just use a CHAR or if the path to picture is very lengthy use Memo, but NOT general.
>>>>Do not store picture in the table, keep only path to it.
>>>>If your application is multyuser you could copy that picture to a folder where everybodey have access (some subfolder of your data folder)
>>>>Then you could use:
>>>>thisform.Image.Picture = ALLTRIM(Table.Field)
>>>>at every change of the record pointer of your table.
>>>
>>>Great, it for sure will work
>>>But it works like a LINKED picture.
>>>Does the GENERAL field save environmental information for LINKED pictures?
>>>
>>>Thak you
>>>
>>>Ed
>>
>>LINKED pictures?
>
>I mean command "APPEND GENERAL resimage FROM (picturefile) LINK"

The General saves everything.
Even the size of the shoes of the developer grandmother :-)
Do Not use it!!!!
If you insist to store the image into DBF then better use MEMO BINARY field and store it that way:
REPLACE ThatMemo WITH FILETOSTR([TheJPG.JPG])
But if you use that way you should extract the picture every time the record pointer changed.
That way is suitable ONLY if you use a single picture.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform