1
0
mirror of https://github.com/openseadragon/openseadragon.git synced 2025-03-24 17:13:52 +03:00

Merge pull request from jpstroop/issue236

IIIF 1.0 now uses pixel based syntax
This commit is contained in:
iangilman 2013-10-05 22:10:41 -07:00
commit c6ca5215d6
56 changed files with 5 additions and 2 deletions
src
test/data
iiif_1_0_files
0,0,1024,1024/pct:25/0
0,0,2048,2048/pct:12.5/0
0,0,256,256/256,/0
0,0,512,512
256,/0
pct:50/0
0,0,775,1024
194,/0
pct:25/0
0,256,256,256/256,/0
0,512,256,256/256,/0
0,512,512,512
256,/0
pct:50/0
0,768,256,256/256,/0
256,0,256,256/256,/0
256,256,256,256/256,/0
256,512,256,256/256,/0
256,768,256,256/256,/0
512,0,256,256/256,/0
512,0,263,512
132,/0
pct:50/0
512,256,256,256/256,/0
512,512,256,256/256,/0
512,512,263,512
132,/0
pct:50/0
512,768,256,256/256,/0
768,0,7,256/7,/0
768,256,7,256/7,/0
768,512,7,256/7,/0
768,768,7,256/7,/0
full
iiif_1_1_files
0,0,256,256/256,256/0
0,256,256,256/256,256/0
0,512,256,256/256,256/0
256,0,256,256/256,256/0
256,256,256,256/256,256/0
256,512,256,256/256,256/0
256,768,256,256/256,256/0
512,0,256,256/256,256/0
512,256,256,256/256,256/0
512,512,256,256/256,256/0
512,768,256,256/256,256/0
768,0,7,256/7,256/0
768,256,7,256/7,256/0
768,512,7,256/7,256/0
768,768,7,256/7,256/0

@ -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(',');
} }

Binary file not shown.

Before

(image error) Size: 20 KiB

Binary file not shown.

Before

(image error) Size: 5.6 KiB

Binary file not shown.

Before

(image error) Size: 32 KiB

Binary file not shown.

Before

(image error) Size: 20 KiB

Binary file not shown.

Before

(image error) Size: 28 KiB

Binary file not shown.

Before

(image error) Size: 11 KiB

Binary file not shown.

Before

(image error) Size: 10 KiB

Binary file not shown.

Before

(image error) Size: 426 B

Binary file not shown.

Before

(image error) Size: 5.6 KiB

Binary file not shown.

Before

(image error) Size: 696 B

Binary file not shown.

Before

(image error) Size: 1.7 KiB

Binary file not shown.

After

(image error) Size: 19 KiB

Binary file not shown.

After

(image error) Size: 27 KiB

Binary file not shown.

After

(image error) Size: 27 KiB

Binary file not shown.

After

(image error) Size: 23 KiB

Binary file not shown.

After

(image error) Size: 36 KiB

Binary file not shown.

After

(image error) Size: 35 KiB

Binary file not shown.

After

(image error) Size: 15 KiB

Binary file not shown.

After

(image error) Size: 15 KiB

Binary file not shown.

After

(image error) Size: 20 KiB

Binary file not shown.

After

(image error) Size: 19 KiB

Binary file not shown.

After

(image error) Size: 11 KiB

Binary file not shown.

After

(image error) Size: 717 B

Binary file not shown.

After

(image error) Size: 716 B

Binary file not shown.

After

(image error) Size: 717 B

Binary file not shown.

After

(image error) Size: 712 B