Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
sample.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> |
<html> |
<head> |
<title>Sample Web Kit Plug-In</title> |
<script LANGUAGE="JavaScript"> |
function brighter() |
{ |
var plugin = document.embeds["CoreImagePlugin"]; |
plugin.gammaValue = plugin.gammaValue + 0.1; |
plugin.setGamma(); |
} |
function darker() |
{ |
var plugin = document.embeds["CoreImagePlugin"]; |
plugin.gammaValue = plugin.gammaValue - 0.1; |
plugin.setGamma(); |
} |
function setImage() |
{ |
var plugin = document.embeds["CoreImagePlugin"]; |
plugin.imageURL = document.webkitTest.urlField.value; |
plugin.setImage(); |
} |
</script> |
</head> |
<body> |
<center> |
<b> |
CoreImage Gamma Correction |
</b> |
<embed name="CoreImagePlugin" width="80%" height="80%" src="http://images.apple.com/home/2005/images/tigerteaserunleashed2005041.jpg" type="image/x-webkitci"></embed> |
<BR> |
<form name="webkitTest" action="" method="post"> |
<input type=button value="Gamma +" onClick="brighter()"> |
<input type=button value="Gamma -" onClick="darker()"> |
<br> |
<br> |
<input type=text name="urlField" size="100" value="http://images.apple.com/home/2005/images/tigerteaserunleashed2005041.jpg"> |
<input type=button value="Set Image" onClick="setImage()"> |
<br> |
</form> |
</center> |
</body> |
</html> |
Copyright © 2005 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2005-11-28