diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..a2f8957c --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: iangilman +patreon: iangilman +open_collective: # Replace with a single Open Collective username +ko_fi: iangilman +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/changelog.txt b/changelog.txt index d29ef6e1..0e9405ff 100644 --- a/changelog.txt +++ b/changelog.txt @@ -10,6 +10,7 @@ OPENSEADRAGON CHANGELOG * Miscellaneous code cleanup (#1840 @msalsbery) * You can now specify tileSize for the Zoomify Tile Source (#1868 @abrlam) * Better use of IIIF "max" and "full" URL parameters (#1871 @MImranAsghar) +* You can now specify the file format of the tiles in the Zoomify tile source (#1889 @abrlam) * Improved browser sniffing - detect EDGE and CHROMEEDGE browsers (#1872 @msalsbery) * Improved DOM event model feature detection (#1872 @msalsbery) * Added support for options parameter on addEvent()/removeEvent (to support passive option) (#1872 @msalsbery) diff --git a/package-lock.json b/package-lock.json index 04ffb707..d236a0a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2578,9 +2578,9 @@ "dev": true }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", "dev": true }, "is-accessor-descriptor": { diff --git a/src/zoomifytilesource.js b/src/zoomifytilesource.js index 7b62a6a8..9ffa4988 100644 --- a/src/zoomifytilesource.js +++ b/src/zoomifytilesource.js @@ -48,6 +48,11 @@ options.tileSize = 256; } + if(typeof options.fileFormat === 'undefined'){ + options.fileFormat = 'jpg'; + this.fileFormat = options.fileFormat; + } + var currentImageSize = { x: options.width, y: options.height @@ -135,7 +140,7 @@ var result = 0; var num = this._calculateAbsoluteTileNumber(level, x, y); result = Math.floor(num / 256); - return this.tilesUrl + 'TileGroup' + result + '/' + level + '-' + x + '-' + y + '.jpg'; + return this.tilesUrl + 'TileGroup' + result + '/' + level + '-' + x + '-' + y + '.' + this.fileFormat; } });