Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the dbf format to hold an image
Message
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
01649850
Message ID:
01649908
Views:
130
>re posting my previous reply in good node-sorry
>********************************************************
>
>*must convert image to a string base encoded 64 to be embed on web independently of the real picture
>*because web cannot acces on your local disc to load any image.
>*this is an example as prototype only.run and test
>*this is also a method how to send pictures from vfp to web
>*vfp strconv() function can do that.
>*can read
>http://yousfi.over-blog.com/2016/01/embedding-images-in-code.html
>----- code*4*
>
>
>Create Cursor ycurs (num i,Description m,img c(100))  &&your table with image field
>Insert Into  ycurs Values(1,"zezzz erere ererer ererer erererere ere ww",Getpict())  &&replace by real image location in your table/cursor
>Insert Into  ycurs Values(2,"zqqqqqq erere ererer ererer erererere ereg",Getpict())
>*....
>Locate
>Local m.x,m.ext as string
>m.x="<table>"
>Scan
>	m.ext=Justext(img)
>	If Lower(m.ext)=="jpg"
>		m.ext="jpeg"
>	Endi
>	m.x=m.x+[<tr><td>]+Trans(num) +[</td><td>]+Description+[</td><td><img src='data:image/]+m.ext+[; base64,]+Strconv(Filetostr(img),13)+[')> </td></tr>]
>Endscan
>Use
>m.x=m.x+"</table>"
>
>Local m.myvar
>TEXT to m.myvar textmerge noshow
><style>
>table, th, td {
>    border: 1px solid tomato;
>}
></style>
><<m.x>>
>ENDTEXT
>Set Safe Off
>Local m.lcdest
>m.lcdest=Addbs(Sys(2023))+"ytemp.html"
>Strtofile(m.myvar,m.lcdest)
>
>Local m.oo
>m.oo=Newobject("hyperlink")
>m.oo.NavigateTo(m.lcdest)
>m.oo=Null
>
I have now seen your answer - thanks a lot

Colin
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Previous
Reply
Map
View

Click here to load this message in the networking platform