add image module

This commit is contained in:
rolux 2011-06-19 17:40:53 +02:00
commit be9928d105
4 changed files with 131 additions and 0 deletions

10
demos/image/index.html Normal file
View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>OxJS Image Demo</title
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="../../build/Ox.js"></script>
<script type="text/javascript" src="js/image.js"></script>
</head>
<body></body>
</html>

11
demos/image/js/image.js Normal file
View file

@ -0,0 +1,11 @@
Ox.load('Image', function() {
Ox.Image('png/Netherlandish Proverbs.png', function(image) {
Ox.element('<img>').attr({src: image.url()}).appendTo(Ox.element('body'));
image.saturation(-0.9);
Ox.element('<img>').attr({src: image.url()}).appendTo(Ox.element('body'));
image.brightness(-0.5);
Ox.element('<img>').attr({src: image.url()}).appendTo(Ox.element('body'));
});
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 KiB