зеркало из https://github.com/mozilla/shumway.git
image: Properly load images with a blank JPEGTables
Some SWFs, like sbemail205.swf (R.I.P.), have a blank JPEGTables. In this case, we'll accidentally chop off the first two bytes of the JPEG, which will cause it to fail to load. We shouldn't do that. This fixes the loading issue with sbemail205.swf, but we don't draw the bitmaps yet. We'll do that soon.
This commit is contained in:
Родитель
5f30eb40ef
Коммит
1cf5a96090
|
@ -18,7 +18,7 @@ function defineImage(tag, dictionary) {
|
|||
if (tag.mimeType === 'image/jpeg') {
|
||||
var width = 0;
|
||||
var height = 0;
|
||||
var i = 2;
|
||||
var i = 0;
|
||||
var n = imgData.length;
|
||||
var code;
|
||||
do {
|
||||
|
@ -103,7 +103,7 @@ function defineImage(tag, dictionary) {
|
|||
var header = tables.data;
|
||||
data = header.substr(0, header.length - 2) + data;
|
||||
} else {
|
||||
data = '\xff\xd8' + data;
|
||||
data = data;
|
||||
}
|
||||
} else {
|
||||
var numChunks = imgData.length / 65536;
|
||||
|
|
Загрузка…
Ссылка в новой задаче