iiiftilesource now uses pixel-based syntax 'w,'. level 1 compliance it still required, so backward compatability should not be an issue
@ -169,7 +169,7 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, {
|
|||||||
scale = Math.pow( 0.5, this.maxLevel - level ),
|
scale = Math.pow( 0.5, this.maxLevel - level ),
|
||||||
|
|
||||||
//## get iiif size
|
//## get iiif size
|
||||||
iiif_size = 'pct:' + ( scale * 100 ),
|
// iiif_size = 'pct:' + ( scale * 100 ),
|
||||||
|
|
||||||
//# image dimensions at this level
|
//# image dimensions at this level
|
||||||
level_width = Math.ceil( this.width * scale ),
|
level_width = Math.ceil( this.width * scale ),
|
||||||
@ -182,16 +182,19 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, {
|
|||||||
iiif_tile_x,
|
iiif_tile_x,
|
||||||
iiif_tile_y,
|
iiif_tile_y,
|
||||||
iiif_tile_w,
|
iiif_tile_w,
|
||||||
iiif_tile_h;
|
iiif_tile_h,
|
||||||
|
iiif_size;
|
||||||
|
|
||||||
|
|
||||||
if ( level_width < this.tile_width && level_height < this.tile_height ){
|
if ( level_width < this.tile_width && level_height < this.tile_height ){
|
||||||
|
iiif_size = level_width + ","; // + level_height; only one dim. for IIIF level 1 compliance
|
||||||
iiif_region = 'full';
|
iiif_region = 'full';
|
||||||
} else {
|
} else {
|
||||||
iiif_tile_x = x * iiif_tile_size_width;
|
iiif_tile_x = x * iiif_tile_size_width;
|
||||||
iiif_tile_y = y * iiif_tile_size_height;
|
iiif_tile_y = y * iiif_tile_size_height;
|
||||||
iiif_tile_w = Math.min( iiif_tile_size_width, this.width - iiif_tile_x );
|
iiif_tile_w = Math.min( iiif_tile_size_width, this.width - iiif_tile_x );
|
||||||
iiif_tile_h = Math.min( iiif_tile_size_height, this.height - iiif_tile_y );
|
iiif_tile_h = Math.min( iiif_tile_size_height, this.height - iiif_tile_y );
|
||||||
|
iiif_size = Math.ceil(iiif_tile_w * scale) + ",";
|
||||||
iiif_region = [ iiif_tile_x, iiif_tile_y, iiif_tile_w, iiif_tile_h ].join(',');
|
iiif_region = [ iiif_tile_x, iiif_tile_y, iiif_tile_w, iiif_tile_h ].join(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 5.6 KiB |
BIN
test/data/iiif_1_0_files/0,0,256,256/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
test/data/iiif_1_0_files/0,0,512,512/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
test/data/iiif_1_0_files/0,0,512,512/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 32 KiB |
BIN
test/data/iiif_1_0_files/0,0,775,1024/194,/0/b0.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
test/data/iiif_1_0_files/0,0,775,1024/194,/0/native.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 20 KiB |
BIN
test/data/iiif_1_0_files/0,256,256,256/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
test/data/iiif_1_0_files/0,512,256,256/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
test/data/iiif_1_0_files/0,512,512,512/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
test/data/iiif_1_0_files/0,512,512,512/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 28 KiB |
BIN
test/data/iiif_1_0_files/0,768,256,256/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
test/data/iiif_1_0_files/0,768,256,256/256,/0/native.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
test/data/iiif_1_0_files/256,0,256,256/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
test/data/iiif_1_0_files/256,256,256,256/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
test/data/iiif_1_0_files/256,512,256,256/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
test/data/iiif_1_0_files/256,768,256,256/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
test/data/iiif_1_0_files/512,0,256,256/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
test/data/iiif_1_0_files/512,0,263,512/132,/0/b0.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
test/data/iiif_1_0_files/512,0,263,512/132,/0/native.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
BIN
test/data/iiif_1_0_files/512,256,256,256/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
test/data/iiif_1_0_files/512,512,256,256/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
test/data/iiif_1_0_files/512,512,263,512/132,/0/b0.jpg
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
test/data/iiif_1_0_files/512,512,263,512/132,/0/native.jpg
Normal file
After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 10 KiB |
BIN
test/data/iiif_1_0_files/512,768,256,256/256,/0/b0.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
test/data/iiif_1_0_files/768,0,7,256/7,/0/b0.jpg
Normal file
After Width: | Height: | Size: 717 B |
BIN
test/data/iiif_1_0_files/768,256,7,256/7,/0/b0.jpg
Normal file
After Width: | Height: | Size: 716 B |
BIN
test/data/iiif_1_0_files/768,512,7,256/7,/0/b0.jpg
Normal file
After Width: | Height: | Size: 717 B |
BIN
test/data/iiif_1_0_files/768,768,7,256/7,/0/b0.jpg
Normal file
After Width: | Height: | Size: 712 B |
BIN
test/data/iiif_1_0_files/full/1,/0/b0.jpg
Normal file
After Width: | Height: | Size: 633 B |
BIN
test/data/iiif_1_0_files/full/1,/0/native.jpg
Normal file
After Width: | Height: | Size: 633 B |
BIN
test/data/iiif_1_0_files/full/13,/0/b0.jpg
Normal file
After Width: | Height: | Size: 810 B |
BIN
test/data/iiif_1_0_files/full/13,/0/native.jpg
Normal file
After Width: | Height: | Size: 810 B |
BIN
test/data/iiif_1_0_files/full/2,/0/b0.jpg
Normal file
After Width: | Height: | Size: 663 B |
BIN
test/data/iiif_1_0_files/full/2,/0/native.jpg
Normal file
After Width: | Height: | Size: 663 B |
BIN
test/data/iiif_1_0_files/full/25,/0/b0.jpg
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
test/data/iiif_1_0_files/full/25,/0/native.jpg
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
test/data/iiif_1_0_files/full/4,/0/b0.jpg
Normal file
After Width: | Height: | Size: 675 B |
BIN
test/data/iiif_1_0_files/full/4,/0/native.jpg
Normal file
After Width: | Height: | Size: 675 B |
BIN
test/data/iiif_1_0_files/full/49,/0/b0.jpg
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
test/data/iiif_1_0_files/full/49,/0/native.jpg
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
test/data/iiif_1_0_files/full/7,/0/b0.jpg
Normal file
After Width: | Height: | Size: 683 B |
BIN
test/data/iiif_1_0_files/full/7,/0/native.jpg
Normal file
After Width: | Height: | Size: 683 B |
BIN
test/data/iiif_1_0_files/full/97,/0/b0.jpg
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
test/data/iiif_1_0_files/full/97,/0/native.jpg
Normal file
After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 426 B |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 696 B |
Before Width: | Height: | Size: 1.7 KiB |