mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Correctly detect the presence of the Adobe specific APP14 JPEG marker (bug 1140761)
According to the specification, http://partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf#G3.851943, the content of the marker segment should begin with `Adobe`, and not `Adobe\x00` as the code currently look for. Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1140761. Fixes the colour conversion part of issues 4090 and 5623.
This commit is contained in:
parent
c17ff30d19
commit
4a9ff471c4
3 changed files with 12 additions and 2 deletions
|
@ -669,9 +669,9 @@ var JpegImage = (function jpegImage() {
|
|||
if (fileMarker === 0xFFEE) {
|
||||
if (appData[0] === 0x41 && appData[1] === 0x64 &&
|
||||
appData[2] === 0x6F && appData[3] === 0x62 &&
|
||||
appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\x00'
|
||||
appData[4] === 0x65) { // 'Adobe'
|
||||
adobe = {
|
||||
version: appData[6],
|
||||
version: (appData[5] << 8) | appData[6],
|
||||
flags0: (appData[7] << 8) | appData[8],
|
||||
flags1: (appData[9] << 8) | appData[10],
|
||||
transformCode: appData[11]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue