Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Want to save jpg photo into a field
Message
From
15/08/1999 21:37:13
 
 
To
15/08/1999 20:48:04
Coann Teng
Computer Infobase System S/B
Kuala Lumpur, Malaysia
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
00253929
Message ID:
00253931
Views:
17
>i developing a payroll program.. i would like to let my user to scan all their employee photo as jpg format [smaller file] and save the adress into a field just like the tastrade - sample program... but tastrade using bmp file [too big for my user] ..i am using visual foxpro 5.0, can anyone recommend a way to solve this problem?? i have downloaded a file from this file section also.. but too bad.. i can save.. but i dunno how to call the file out using code...
>
>
>
>thank in advance



To fill in General Field with jpg photo, you can still use Replace cmd!

But most ppl would suggest you to Save the path of photo instead of actual photo, it would Not put all photos to danger if any corruption of database field! (unless you have enough backup!)

To show jpg photo in form, you can:
1) use the VFP Active X control hwnd to show (Select ActiveX to use the control)
2) visit http://www.wang.com/ to d/l the M$ support freeware on Imaging.
(If you are using Win 98 or Win 95 2.5c, your can simply open Imaging and see any wang logo to show! A scanner icon at first toolbar button)
Here is a sample on Wang product in File Section!
This Wang control is more powerful than original ActiveX control.
It provide any rotate, enlarging, Simple print picture function!



If you use a field to carry the path of photo, (e.g. photopath)

you can show it by:

* when change record, thisform.ChgRecord New proc
if empty(staff.photopath)
thisform.imgcontrol.visible = .f.
else
thisform.imgcontrol.picture = loadpic(staff.photopath)
thisform.imgcontrol.visible = .t.
endif

the above coding will work either hwnd control or Wang's control.
So, you can handle them with easy without afraid the size of fpt will get very large in size!

^_~ Good luck!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Reply
Map
View

Click here to load this message in the networking platform