mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
parent
335d8394cd
commit
55f943c4fa
2 changed files with 3 additions and 3 deletions
2
external/openjpeg/openjpeg.js
vendored
2
external/openjpeg/openjpeg.js
vendored
File diff suppressed because one or more lines are too long
|
@ -13,7 +13,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { BaseException } from "../shared/util.js";
|
import { BaseException, warn } from "../shared/util.js";
|
||||||
import OpenJPEG from "../../external/openjpeg/openjpeg.js";
|
import OpenJPEG from "../../external/openjpeg/openjpeg.js";
|
||||||
|
|
||||||
class JpxError extends BaseException {
|
class JpxError extends BaseException {
|
||||||
|
@ -26,7 +26,7 @@ class JpxImage {
|
||||||
static #module = null;
|
static #module = null;
|
||||||
|
|
||||||
static decode(data, ignoreColorSpace = false) {
|
static decode(data, ignoreColorSpace = false) {
|
||||||
this.#module ||= OpenJPEG();
|
this.#module ||= OpenJPEG({ warn });
|
||||||
const imageData = this.#module.decode(data, ignoreColorSpace);
|
const imageData = this.#module.decode(data, ignoreColorSpace);
|
||||||
if (typeof imageData === "string") {
|
if (typeof imageData === "string") {
|
||||||
throw new JpxError(imageData);
|
throw new JpxError(imageData);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue