Code Example
Copy this code example into a .php file. In order to run correctly, you must place annotations.php and JPEG.php on your server and change paths in the include directives below as needed.
<?
/*
* This example illustrates how to insert
* annotated image into your web page
*/
include "../annotations.php";
include "../JPEG.php";
// creating object
$a = new CAnnotationDisplay();
// turn on links replacement (http, mailto, ..)
$a->flag_replaceLinks(1);
?>
<html>
<title>Display annotations. Example.</title>
<? echo $a->getStyles(); ?>
<? echo $a->getJavascript(); ?>
<body>
This example illustrates how to insert
annotated image into your web page.<br>
<?echo $a->getAnnotatedImageFromFile(
"sample.jpg", "sample.jpg"); ?>
</body>
</html>
|