fix globals in image module
This commit is contained in:
parent
a4982ff81b
commit
812d172e23
1 changed files with 3 additions and 3 deletions
|
@ -50,6 +50,7 @@ Ox.load.Image = function(options, callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getIndex() {
|
function getIndex() {
|
||||||
|
var xy;
|
||||||
if (arguments.length == 1) {
|
if (arguments.length == 1) {
|
||||||
xy = arguments[0];
|
xy = arguments[0];
|
||||||
} else {
|
} else {
|
||||||
|
@ -106,7 +107,7 @@ Ox.load.Image = function(options, callback) {
|
||||||
@*/
|
@*/
|
||||||
that.blur = function(val) {
|
that.blur = function(val) {
|
||||||
var filter = [],
|
var filter = [],
|
||||||
size = val * 2 + 1;
|
size = val * 2 + 1,
|
||||||
sum = 0
|
sum = 0
|
||||||
Ox.loop(size, function(x) {
|
Ox.loop(size, function(x) {
|
||||||
Ox.loop(size, function(y) {
|
Ox.loop(size, function(y) {
|
||||||
|
@ -240,7 +241,6 @@ Ox.load.Image = function(options, callback) {
|
||||||
return mode & 1 << bit ? bit : null;
|
return mode & 1 << bit ? bit : null;
|
||||||
}),
|
}),
|
||||||
cap = getCapacity(bits.length), len;
|
cap = getCapacity(bits.length), len;
|
||||||
Ox.print("CAPACITY", cap)
|
|
||||||
// Compress the string
|
// Compress the string
|
||||||
str = Ox[deflate ? 'encodeDeflate' : 'encodeUTF8'](str);
|
str = Ox[deflate ? 'encodeDeflate' : 'encodeUTF8'](str);
|
||||||
len = str.length;
|
len = str.length;
|
||||||
|
@ -311,7 +311,7 @@ Ox.load.Image = function(options, callback) {
|
||||||
bits = mode < 1 ? [-mode] : Ox.map(Ox.range(8), function(b) {
|
bits = mode < 1 ? [-mode] : Ox.map(Ox.range(8), function(b) {
|
||||||
return mode & 1 << b ? b : null;
|
return mode & 1 << b ? b : null;
|
||||||
}),
|
}),
|
||||||
done = 0; len = 4, str = '';
|
done = 0, len = 4, str = '';
|
||||||
that.forEach(function(rgba, xy) {
|
that.forEach(function(rgba, xy) {
|
||||||
if (rgba[3] == 255) {
|
if (rgba[3] == 255) {
|
||||||
var index = getIndex(xy);
|
var index = getIndex(xy);
|
||||||
|
|
Loading…
Reference in a new issue