Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to capture photo/picture in my database and display
Message
From
25/01/2008 00:23:36
 
 
To
24/01/2008 21:19:50
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01282114
Message ID:
01285425
Views:
25
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform