Can't sprited resources whos resulting dataURL is larger than 32k, not resources which themselves are over 32k.

This commit is contained in:
Ross Boucher committed 2010-05-12 19:08:30 -07:00
1 parent ac81ab458c
commit 80b70ec6b9
1 file changed
+3 -1
@@ -453,7 +453,9 @@ BundleTask.prototype.resourcesPath = function()
// Don't sprite images larger than 32KB, IE 8 doesn't like it.
BundleTask.isSpritable = function(aResourcePath) {
return isImage(aResourcePath) && FILE.size(aResourcePath) < 32768;
return isImage(aResourcePath) && FILE.size(aResourcePath) < 32768 &&
("data:" + mimeType(aResourcePath) + ";base64," +
base64.encode(FILE.read(aResourcePath, "b"))).length < 32768;
}
BundleTask.prototype.defineResourceTask = function(aResourcePath, aDestinationPath)