From 9821f2f2cec7b432f344c6aef2ec7fe0df2bf003 Mon Sep 17 00:00:00 2001 From: Roy Haddad Date: Wed, 11 Jul 2012 02:59:17 -0700 Subject: [PATCH] Added the option 'nounload' If the image data was loaded into an object URL, this option prevents it from being unloaded once the image is ready. --- load-image.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/load-image.js b/load-image.js index 5de5cb2..7dca564 100644 --- a/load-image.js +++ b/load-image.js @@ -24,7 +24,7 @@ oUrl; img.onerror = callback; img.onload = function () { - if (oUrl) { + if (oUrl && !options.nounload) { loadImage.revokeObjectURL(oUrl); } callback(loadImage.scale(img, options));