mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #9470 from Snuffleupagus/issue-4888
Ensure that `JpegImage.getData` returns the correct data length when `forceRGBoutput == true` (issue 4888)
This commit is contained in:
commit
a89071bdef
2 changed files with 24 additions and 3 deletions
|
@ -1083,7 +1083,8 @@ var JpegImage = (function JpegImageClosure() {
|
|||
0.116935020465145) +
|
||||
k * (-0.000343531996510555 * k + 0.24165260232407);
|
||||
}
|
||||
return data;
|
||||
// Ensure that only the converted RGB data is returned.
|
||||
return data.subarray(0, offset);
|
||||
},
|
||||
|
||||
_convertYcckToCmyk: function convertYcckToCmyk(data) {
|
||||
|
@ -1140,7 +1141,8 @@ var JpegImage = (function JpegImageClosure() {
|
|||
193.58209356861505) -
|
||||
k * (22.33816807309886 * k + 180.12613974708367);
|
||||
}
|
||||
return data;
|
||||
// Ensure that only the converted RGB data is returned.
|
||||
return data.subarray(0, offset);
|
||||
},
|
||||
|
||||
getData: function getData(width, height, forceRGBoutput) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue