Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to capture photo/picture in my database and display
Message
 
 
À
24/01/2008 21:19:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01282114
Message ID:
01285425
Vues:
26
>Thanks.
>
>Gdiplus.prg is a prg version of the Class Library "_gdiplus.vcx". I found it in the directory "C:program files\microsoft visual foxpro 9\ffc\". This file came with VFP 9, I don't know if anything like it is with VFP 6.
>
>The file is not in VFP 6 and I do not know what to do.

You can use the commented line
COPY FILE (ThisForm._Image1.Picture) TO (CCFront+ImageFN)
instead of the lines dealing with Gdiplus
oImage=NEWOBJECT("Gpimage","Gdiplus.prg")
oImage.CreateFromFile((ThisForm.imgphoto.Picture))
oImage.SaveToFile((CCFront+ImageFN),"image/jpeg")
oImage=""
If you can't be sure that the photos will be JPG's then you will have to save the file extension when the photo is selected and store it in the student record so that it can be used to save and retrieve the photo.

You will then have to change the line
ImageFN=RTRIM(docstring)+".jpg"
to
ImageFN=RTRIM(docstring)+stored_file_extension
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform