From c211b55d3bff1459a3c9ae0137eddac7cef0aa5e Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 28 Jun 2012 18:36:25 +0200 Subject: [PATCH] fix bug in pixel method (arguments parsing) --- source/Ox.Image/Ox.Image.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Ox.Image/Ox.Image.js b/source/Ox.Image/Ox.Image.js index 1994b527..7055c329 100644 --- a/source/Ox.Image/Ox.Image.js +++ b/source/Ox.Image/Ox.Image.js @@ -682,9 +682,9 @@ Ox.load.Image = function(options, callback) { val <[n]> RGBA values @*/ that.pixel = function() { - var xy = arguments.length == 1 || Ox.isArray(arguments[1]) + var xy = Ox.isArray(arguments[0]) ? arguments[0] : [arguments[0], arguments[1]], - val = Ox.isArray(Ox.last(arguments)) + val = arguments.length > 1 && Ox.isArray(Ox.last(arguments)) ? Ox.last(arguments) : null, i = getIndex(xy), ret;