Difference between revisions of "BASE64 ENCODE IMAGE()"
From Lianjapedia
Yvonne.milne (Talk | contribs) (Created page with "==Purpose== Generates the base64 encoded contents of an object field image as an IMG tag and output it into the HTML5 ==Syntax== BASE64_ENCODE_FILE(<object-fieldname> [, <cWi...") |
Yvonne.milne (Talk | contribs) |
||
Line 3: | Line 3: | ||
==Syntax== | ==Syntax== | ||
− | + | BASE64_ENCODE_IMAGE(<object-fieldname> [, <cWidth> [, <cHeight> [, <cCSSattribute>]]]) | |
==See Also== | ==See Also== | ||
Line 9: | Line 9: | ||
==Description== | ==Description== | ||
− | The | + | The BASE64_ENCODE_IMAGE() function is used to generates the base64 encoded contents of an object field image as an IMG tag and output it into the HTML5. The optional <cWidth> and <cHeight> can be used to specify the image dimensions and <cCSSattribute> to add additional CSS attributes. |
==Example== | ==Example== |
Revision as of 04:49, 6 September 2013
Contents
Purpose
Generates the base64 encoded contents of an object field image as an IMG tag and output it into the HTML5
Syntax
BASE64_ENCODE_IMAGE(<object-fieldname> [, <cWidth> [, <cHeight> [, <cCSSattribute>]]])
See Also
BASE64_DECODE(), BASE64_ENCODE()
Description
The BASE64_ENCODE_IMAGE() function is used to generates the base64 encoded contents of an object field image as an IMG tag and output it into the HTML5. The optional <cWidth> and <cHeight> can be used to specify the image dimensions and <cCSSattribute> to add additional CSS attributes.
Example
<%@ Language=VFP %> <html> <head> <style> .pics { opacity:0.4; } .pics:hover { opacity:1.0; } </style> </head> <body> <% ? "<table width='80%' align=center cellpadding=12>" ? "<tr>" ? "<td align=center colspan=2>" ? "<h1>Lianja example - image queries</h1>" ? '<p>Customize this to suit your own needs. This is a just an example.<p>' ? '<hr size="1px" color="lightgray"/>' ? "</td>" ? "</tr>" ? "<tr>" ? "<td colspan=2>" ? "<h3>Employees</h3>" ? "</td>" ? "</tr>" // scan through the employees table open database southwind use employees scan ? "<tr>" ? "<td>" ? "<a target='_blank' href='../odata/southwind/orders(" ; + etos(employeeid) ; + ",employeeid)'>" base64_encode_image(photo,"180px","200px","class='pics'") ? '</a>' ? "</td>" ? "<td>" ? mtos(notes) ? "</td>" ? "<tr>" ? '<td colspan="2">' ? '<hr size="1px" color="lightgray"/>' ? "</td>" ? "</tr>" ? "</tr>" endscan close data ? "<tr>" ? "<td align=center colspan=2>" ? "<p>Copyright © 2013 Lianja Inc. All rights reserved worldwide.</p>" ? "<h3><a href 'http://www.lianja.com'> www.lianja.com</a></h3>" ? "</td>" ? "</tr>" ? "</table>" %> </body> </html>