fix globals in image module

This commit is contained in:
rolux 2012-01-02 11:51:36 +05:30
parent a4982ff81b
commit 812d172e23

View file

@ -50,6 +50,7 @@ Ox.load.Image = function(options, callback) {
}
function getIndex() {
var xy;
if (arguments.length == 1) {
xy = arguments[0];
} else {
@ -106,7 +107,7 @@ Ox.load.Image = function(options, callback) {
@*/
that.blur = function(val) {
var filter = [],
size = val * 2 + 1;
size = val * 2 + 1,
sum = 0
Ox.loop(size, function(x) {
Ox.loop(size, function(y) {
@ -240,7 +241,6 @@ Ox.load.Image = function(options, callback) {
return mode & 1 << bit ? bit : null;
}),
cap = getCapacity(bits.length), len;
Ox.print("CAPACITY", cap)
// Compress the string
str = Ox[deflate ? 'encodeDeflate' : 'encodeUTF8'](str);
len = str.length;
@ -311,7 +311,7 @@ Ox.load.Image = function(options, callback) {
bits = mode < 1 ? [-mode] : Ox.map(Ox.range(8), function(b) {
return mode & 1 << b ? b : null;
}),
done = 0; len = 4, str = '';
done = 0, len = 4, str = '';
that.forEach(function(rgba, xy) {
if (rgba[3] == 255) {
var index = getIndex(xy);