swap the meaning of makeArray and toArray: makeArray, like makeObject, is a helper function for arguments processing (that wraps any non-array in an array), toArray, like in other libraries, is an alias for Array.prototype.slice.call
This commit is contained in:
parent
5cabb679f9
commit
5692195509
21 changed files with 88 additions and 88 deletions
|
|
@ -252,7 +252,7 @@
|
|||
// Unfortunately, we can't synchronously set the source of an image,
|
||||
// draw it onto a canvas, and read its data.
|
||||
image.onload = function() {
|
||||
str = Ox.makeArray(Ox.canvas(image).data).map(function(v, i) {
|
||||
str = Ox.toArray(Ox.canvas(image).data).map(function(v, i) {
|
||||
// Read one character per RGB byte, ignore ALPHA.
|
||||
return i % 4 < 3 ? Ox.char(v) : '';
|
||||
}).join('');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue