forked from 0x2620/oxjs
update documentation, add test
This commit is contained in:
parent
7240cf2c38
commit
5204ef14b4
2 changed files with 6 additions and 4 deletions
|
|
@ -15,6 +15,8 @@ Ox.load.Image = function(options, callback) {
|
|||
width <n> Width in px
|
||||
image <n> Height in px
|
||||
background <[n]> Background color (RGB or RGBA)
|
||||
> Ox.Image(Ox.UI.PATH + 'themes/classic/png/icon16.png', function(i) { i.encode('foo', function(i) { i.decode(function(s) { Ox.test(s, 'foo') })})})
|
||||
undefined
|
||||
@*/
|
||||
Ox.Image = function() {
|
||||
|
||||
|
|
@ -328,11 +330,11 @@ Ox.load.Image = function(options, callback) {
|
|||
deflate <b|true> If true, encode the string with deflate
|
||||
mode <n|0> Encoding mode
|
||||
If mode is between -7 and 0, the string will be encoded one bit
|
||||
per byte, as the number of bits within that byte set to 1,
|
||||
per RGB byte, as the number of bits within that byte set to 1,
|
||||
modulo 2, by flipping, if necessary, the most (mode -7) to least
|
||||
(mode 0) significant bit. If mode is between 1 and 255, the
|
||||
string will be encoded bitwise into all bits per byte that, in
|
||||
mode, are set to 1.
|
||||
string will be encoded bitwise into all bits per RGB byte that,
|
||||
in mode, are set to 1.
|
||||
@*/
|
||||
that.encode = function(str) {
|
||||
var callback = arguments[arguments.length - 1],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue