-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
node_modules | ||
package.json | ||
package-lock.json | ||
libopenjpeg* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// DO NOT USE THIS FILE IN SERVICE WORKERS. USE imagebox3.js INSTEAD. | ||
|
||
import { fromUrl, Pool } from "https://cdn.jsdelivr.net/npm/[email protected]/+esm" | ||
import { fromBlob, fromUrl, Pool } from "https://cdn.jsdelivr.net/npm/[email protected]/+esm" | ||
|
||
const imagebox3 = (() => { | ||
|
||
|
@@ -197,7 +197,7 @@ const imagebox3 = (() => { | |
|
||
try { | ||
const headers = cache ? { headers: {'Cache-Control': "no-cache, no-store"}} : {} | ||
tiff[imageID].pyramid = tiff[imageID].pyramid || ( await fromUrl(imageID, headers) ) | ||
tiff[imageID].pyramid = tiff[imageID].pyramid || ( imageID instanceof File ? await fromBlob(imageID) : await fromUrl(imageID, headers) ) | ||
|
||
const imageCount = await tiff[imageID].pyramid.getImageCount() | ||
if (tiff[imageID].pyramid.loadedCount !== imageCount) { | ||
|