forked from 0x2620/oxjs
add image module
This commit is contained in:
parent
b60f0c8791
commit
be9928d105
4 changed files with 131 additions and 0 deletions
10
demos/image/index.html
Normal file
10
demos/image/index.html
Normal 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
11
demos/image/js/image.js
Normal 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'));
|
||||
});
|
||||
|
||||
});
|
||||
BIN
demos/image/png/Netherlandish Proverbs.png
Normal file
BIN
demos/image/png/Netherlandish Proverbs.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 387 KiB |
Loading…
Add table
Add a link
Reference in a new issue