From c6f812bf8c811233061caef084255ede16dc74ca Mon Sep 17 00:00:00 2001 From: abraham lam Date: Wed, 23 Sep 2020 21:45:20 -0400 Subject: [PATCH] fileFormat is no longer hard coded in Zoomify Tile Source --- src/zoomifytilesource.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } });