diff --git a/src/iiif1_1tilesource.js b/src/iiif1_1tilesource.js index 100c2fcc..a1b376d6 100644 --- a/src/iiif1_1tilesource.js +++ b/src/iiif1_1tilesource.js @@ -68,7 +68,7 @@ $.IIIF1_1TileSource = function( options ){ // dimension var short_dim = Math.min(this.height, this.width), - tile_options = [128,256,512,1024], + tile_options = [256,512,1024], smaller_tiles = []; for ( var c = 0; c < tile_options.length; c++ ) { @@ -76,13 +76,20 @@ $.IIIF1_1TileSource = function( options ){ smaller_tiles.push(tile_options[c]); } } - options.tileSize = Math.max.apply(null, smaller_tiles); + if ( smaller_tiles.length > 0 ) { + options.tileSize = Math.max.apply(null, smaller_tiles); + } else { + // If we're smaller than 256, just use the short side. + options.tileSize = short_dim; + } + this.tile_width = options.tileSize; // So that 'full' gets used for + this.tile_height = options.tileSize; // the region below } if (! options.maxLevel ) { - var mf = -1 -; var scfs = this.scale_factors || this.scale_factor; + var mf = -1; + var scfs = this.scale_factors || this.scale_factor; if ( scfs instanceof Array ) { for ( var i = 0; i < scfs.length; i++ ) { var cf = Number( scfs[i] ); @@ -165,7 +172,7 @@ $.extend( $.IIIF1_1TileSource.prototype, $.TileSource.prototype, /** @lends Open uri; if ( level_width < this.tile_width && level_height < this.tile_height ){ - iiif_size = level_width + "," + level_height; + iiif_size = level_width + ","; iiif_region = 'full'; } else { iiif_tile_x = x * iiif_tile_size_width; @@ -173,12 +180,7 @@ $.extend( $.IIIF1_1TileSource.prototype, $.TileSource.prototype, /** @lends Open 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 ); - if( (this.profile && - this.profile == "http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1" ) ){ - iiif_size = Math.ceil(iiif_tile_w * scale) + ","; - } else { - iiif_size = Math.ceil(iiif_tile_w * scale) + "," + Math.ceil(iiif_tile_h * scale); - } + iiif_size = Math.ceil(iiif_tile_w * scale) + ","; iiif_region = [ iiif_tile_x, iiif_tile_y, iiif_tile_w, iiif_tile_h ].join(','); } diff --git a/test/data/iiif_1_1_no_tiles_1048.json b/test/data/iiif_1_1_no_tiles_1048.json new file mode 100644 index 00000000..e5789846 --- /dev/null +++ b/test/data/iiif_1_1_no_tiles_1048.json @@ -0,0 +1,18 @@ +{ + "profile": "http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1", + "height": 870, + "width": 1048, + "qualities": [ + "native", + "color", + "grey", + "bitonal" + ], + "formats": [ + "jpg", + "png", + "gif" + ], + "@context": "http://library.stanford.edu/iiif/image-api/1.1/context.json", + "@id": "http://localhost:8000/test/data/iiif_1_1_no_tiles_1048" +} diff --git a/test/data/iiif_1_1_no_tiles_1048/0,0,1024,870/512,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/0,0,1024,870/512,/0/native.jpg new file mode 100644 index 00000000..2a103534 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/0,0,1024,870/512,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_1048/0,0,512,512/512,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/0,0,512,512/512,/0/native.jpg new file mode 100644 index 00000000..abe1eab4 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/0,0,512,512/512,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_1048/0,512,512,358/512,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/0,512,512,358/512,/0/native.jpg new file mode 100644 index 00000000..2e3a12c9 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/0,512,512,358/512,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_1048/1024,0,24,512/24,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/1024,0,24,512/24,/0/native.jpg new file mode 100644 index 00000000..55fffb23 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/1024,0,24,512/24,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_1048/1024,0,24,870/12,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/1024,0,24,870/12,/0/native.jpg new file mode 100644 index 00000000..ed7a45c1 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/1024,0,24,870/12,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_1048/1024,512,24,358/24,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/1024,512,24,358/24,/0/native.jpg new file mode 100644 index 00000000..2ad1ab7a Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/1024,512,24,358/24,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_1048/512,0,512,512/512,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/512,0,512,512/512,/0/native.jpg new file mode 100644 index 00000000..ec687491 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/512,0,512,512/512,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_1048/512,512,512,358/512,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/512,512,512,358/512,/0/native.jpg new file mode 100644 index 00000000..9609e3e0 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/512,512,512,358/512,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_1048/full/131,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/full/131,/0/native.jpg new file mode 100644 index 00000000..b2d34820 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/full/131,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_1048/full/17,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/full/17,/0/native.jpg new file mode 100644 index 00000000..e66b6ef7 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/full/17,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_1048/full/262,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/full/262,/0/native.jpg new file mode 100644 index 00000000..b6a4288d Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/full/262,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_1048/full/33,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/full/33,/0/native.jpg new file mode 100644 index 00000000..c8dd168c Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/full/33,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_1048/full/66,/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/full/66,/0/native.jpg new file mode 100644 index 00000000..65d0a09d Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_1048/full/66,/0/native.jpg differ diff --git a/test/data/iiif_no_tiles/0,0,1024,850/16,14/0/native.jpg b/test/data/iiif_1_1_no_tiles_1048/full/9,/0/native.jpg similarity index 66% rename from test/data/iiif_no_tiles/0,0,1024,850/16,14/0/native.jpg rename to test/data/iiif_1_1_no_tiles_1048/full/9,/0/native.jpg index 4cee30fa..f51d6103 100644 Binary files a/test/data/iiif_no_tiles/0,0,1024,850/16,14/0/native.jpg and b/test/data/iiif_1_1_no_tiles_1048/full/9,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_255.json b/test/data/iiif_1_1_no_tiles_255.json new file mode 100644 index 00000000..12a09460 --- /dev/null +++ b/test/data/iiif_1_1_no_tiles_255.json @@ -0,0 +1,18 @@ +{ + "profile": "http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1", + "height": 212, + "width": 255, + "qualities": [ + "native", + "color", + "grey", + "bitonal" + ], + "formats": [ + "jpg", + "png", + "gif" + ], + "@context": "http://library.stanford.edu/iiif/image-api/1.1/context.json", + "@id": "http://localhost:8000/test/data/iiif_1_1_no_tiles_255" +} diff --git a/test/data/iiif_1_1_no_tiles_255/0,0,212,212/212,/0/native.jpg b/test/data/iiif_1_1_no_tiles_255/0,0,212,212/212,/0/native.jpg new file mode 100644 index 00000000..b41466da Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_255/0,0,212,212/212,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_255/212,0,43,212/43,/0/native.jpg b/test/data/iiif_1_1_no_tiles_255/212,0,43,212/43,/0/native.jpg new file mode 100644 index 00000000..03cc9619 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_255/212,0,43,212/43,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_255/full/128,/0/native.jpg b/test/data/iiif_1_1_no_tiles_255/full/128,/0/native.jpg new file mode 100644 index 00000000..69c602b8 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_255/full/128,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_255/full/16,/0/native.jpg b/test/data/iiif_1_1_no_tiles_255/full/16,/0/native.jpg new file mode 100644 index 00000000..42b54ec6 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_255/full/16,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_255/full/32,/0/native.jpg b/test/data/iiif_1_1_no_tiles_255/full/32,/0/native.jpg new file mode 100644 index 00000000..c341f30b Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_255/full/32,/0/native.jpg differ diff --git a/test/data/iiif_no_tiles/0,0,1024,850/8,7/0/native.jpg b/test/data/iiif_1_1_no_tiles_255/full/4,/0/native.jpg similarity index 79% rename from test/data/iiif_no_tiles/0,0,1024,850/8,7/0/native.jpg rename to test/data/iiif_1_1_no_tiles_255/full/4,/0/native.jpg index 893409b0..62fdf391 100644 Binary files a/test/data/iiif_no_tiles/0,0,1024,850/8,7/0/native.jpg and b/test/data/iiif_1_1_no_tiles_255/full/4,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_255/full/64,/0/native.jpg b/test/data/iiif_1_1_no_tiles_255/full/64,/0/native.jpg new file mode 100644 index 00000000..83629b8e Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_255/full/64,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_255/full/8,/0/native.jpg b/test/data/iiif_1_1_no_tiles_255/full/8,/0/native.jpg new file mode 100644 index 00000000..087db0a1 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_255/full/8,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_384.json b/test/data/iiif_1_1_no_tiles_384.json new file mode 100644 index 00000000..112a0be6 --- /dev/null +++ b/test/data/iiif_1_1_no_tiles_384.json @@ -0,0 +1,18 @@ +{ + "profile": "http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1", + "height": 319, + "width": 384, + "qualities": [ + "native", + "color", + "grey", + "bitonal" + ], + "formats": [ + "jpg", + "png", + "gif" + ], + "@context": "http://library.stanford.edu/iiif/image-api/1.1/context.json", + "@id": "http://localhost:8000/test/data/iiif_1_1_no_tiles_384" +} diff --git a/test/data/iiif_1_1_no_tiles_384/0,0,256,256/256,/0/native.jpg b/test/data/iiif_1_1_no_tiles_384/0,0,256,256/256,/0/native.jpg new file mode 100644 index 00000000..f2affd34 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_384/0,0,256,256/256,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_384/0,256,256,63/256,/0/native.jpg b/test/data/iiif_1_1_no_tiles_384/0,256,256,63/256,/0/native.jpg new file mode 100644 index 00000000..a44db124 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_384/0,256,256,63/256,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_384/256,0,128,256/128,/0/native.jpg b/test/data/iiif_1_1_no_tiles_384/256,0,128,256/128,/0/native.jpg new file mode 100644 index 00000000..61f8d677 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_384/256,0,128,256/128,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_384/256,256,128,63/128,/0/native.jpg b/test/data/iiif_1_1_no_tiles_384/256,256,128,63/128,/0/native.jpg new file mode 100644 index 00000000..a1002c86 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_384/256,256,128,63/128,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_384/full/12,/0/native.jpg b/test/data/iiif_1_1_no_tiles_384/full/12,/0/native.jpg new file mode 100644 index 00000000..2677d6c1 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_384/full/12,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_384/full/192,/0/native.jpg b/test/data/iiif_1_1_no_tiles_384/full/192,/0/native.jpg new file mode 100644 index 00000000..00593f8a Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_384/full/192,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_384/full/24,/0/native.jpg b/test/data/iiif_1_1_no_tiles_384/full/24,/0/native.jpg new file mode 100644 index 00000000..ee21015d Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_384/full/24,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_384/full/48,/0/native.jpg b/test/data/iiif_1_1_no_tiles_384/full/48,/0/native.jpg new file mode 100644 index 00000000..5597681c Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_384/full/48,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_384/full/6,/0/native.jpg b/test/data/iiif_1_1_no_tiles_384/full/6,/0/native.jpg new file mode 100644 index 00000000..8c4134df Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_384/full/6,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_384/full/96,/0/native.jpg b/test/data/iiif_1_1_no_tiles_384/full/96,/0/native.jpg new file mode 100644 index 00000000..38a07820 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_384/full/96,/0/native.jpg differ diff --git a/test/data/iiif_no_tiles.json b/test/data/iiif_1_1_no_tiles_768.json similarity index 75% rename from test/data/iiif_no_tiles.json rename to test/data/iiif_1_1_no_tiles_768.json index 7f677b32..743d6128 100644 --- a/test/data/iiif_no_tiles.json +++ b/test/data/iiif_1_1_no_tiles_768.json @@ -1,7 +1,7 @@ { "profile": "http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2", - "height": 850, - "width": 1024, + "height": 637, + "width": 768, "qualities": [ "native", "color", @@ -14,6 +14,5 @@ "gif" ], "@context": "http://library.stanford.edu/iiif/image-api/1.1/context.json", - "@id": "http://localhost:8000/test/data/iiif_no_tiles" + "@id": "http://localhost:8000/test/data/iiif_1_1_no_tiles_768" } - diff --git a/test/data/iiif_1_1_no_tiles_768/0,0,512,512/512,/0/native.jpg b/test/data/iiif_1_1_no_tiles_768/0,0,512,512/512,/0/native.jpg new file mode 100644 index 00000000..c547135f Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_768/0,0,512,512/512,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_768/0,512,512,125/512,/0/native.jpg b/test/data/iiif_1_1_no_tiles_768/0,512,512,125/512,/0/native.jpg new file mode 100644 index 00000000..88717a4d Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_768/0,512,512,125/512,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_768/512,0,256,512/256,/0/native.jpg b/test/data/iiif_1_1_no_tiles_768/512,0,256,512/256,/0/native.jpg new file mode 100644 index 00000000..3423bc3a Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_768/512,0,256,512/256,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_768/512,512,256,125/256,/0/native.jpg b/test/data/iiif_1_1_no_tiles_768/512,512,256,125/256,/0/native.jpg new file mode 100644 index 00000000..8fee2e2e Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_768/512,512,256,125/256,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_768/full/12,/0/native.jpg b/test/data/iiif_1_1_no_tiles_768/full/12,/0/native.jpg new file mode 100644 index 00000000..97ddd626 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_768/full/12,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_768/full/192,/0/native.jpg b/test/data/iiif_1_1_no_tiles_768/full/192,/0/native.jpg new file mode 100644 index 00000000..0f786ee9 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_768/full/192,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_768/full/24,/0/native.jpg b/test/data/iiif_1_1_no_tiles_768/full/24,/0/native.jpg new file mode 100644 index 00000000..151eed0f Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_768/full/24,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_768/full/384,/0/native.jpg b/test/data/iiif_1_1_no_tiles_768/full/384,/0/native.jpg new file mode 100644 index 00000000..9dcd340f Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_768/full/384,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_768/full/48,/0/native.jpg b/test/data/iiif_1_1_no_tiles_768/full/48,/0/native.jpg new file mode 100644 index 00000000..6ceb6842 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_768/full/48,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_768/full/6,/0/native.jpg b/test/data/iiif_1_1_no_tiles_768/full/6,/0/native.jpg new file mode 100644 index 00000000..20139e5e Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_768/full/6,/0/native.jpg differ diff --git a/test/data/iiif_1_1_no_tiles_768/full/96,/0/native.jpg b/test/data/iiif_1_1_no_tiles_768/full/96,/0/native.jpg new file mode 100644 index 00000000..299589b6 Binary files /dev/null and b/test/data/iiif_1_1_no_tiles_768/full/96,/0/native.jpg differ diff --git a/test/data/iiif1_1.json b/test/data/iiif_1_1_tiled.json similarity index 88% rename from test/data/iiif1_1.json rename to test/data/iiif_1_1_tiled.json index 1ad7a6fa..641d8511 100644 --- a/test/data/iiif1_1.json +++ b/test/data/iiif_1_1_tiled.json @@ -24,5 +24,5 @@ "gif" ], "@context": "http://library.stanford.edu/iiif/image-api/1.1/context.json", - "@id": "http://localhost:8000/test/data/iiif_1_1_files" + "@id": "http://localhost:8000/test/data/iiif_1_1_tiled" } diff --git a/test/data/iiif_1_1_files/0,0,256,256/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/0,0,256,256/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/0,0,256,256/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/0,0,256,256/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/0,0,512,512/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/0,0,512,512/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/0,0,512,512/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/0,0,512,512/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/0,0,775,1024/194,256/0/native.jpg b/test/data/iiif_1_1_tiled/0,0,775,1024/194,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/0,0,775,1024/194,256/0/native.jpg rename to test/data/iiif_1_1_tiled/0,0,775,1024/194,/0/native.jpg diff --git a/test/data/iiif_1_1_files/0,256,256,256/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/0,256,256,256/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/0,256,256,256/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/0,256,256,256/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/0,512,256,256/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/0,512,256,256/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/0,512,256,256/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/0,512,256,256/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/0,512,512,512/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/0,512,512,512/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/0,512,512,512/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/0,512,512,512/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/0,768,256,256/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/0,768,256,256/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/0,768,256,256/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/0,768,256,256/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/256,0,256,256/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/256,0,256,256/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/256,0,256,256/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/256,0,256,256/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/256,256,256,256/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/256,256,256,256/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/256,256,256,256/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/256,256,256,256/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/256,512,256,256/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/256,512,256,256/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/256,512,256,256/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/256,512,256,256/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/256,768,256,256/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/256,768,256,256/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/256,768,256,256/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/256,768,256,256/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/512,0,256,256/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/512,0,256,256/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/512,0,256,256/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/512,0,256,256/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/512,0,263,512/132,256/0/native.jpg b/test/data/iiif_1_1_tiled/512,0,263,512/132,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/512,0,263,512/132,256/0/native.jpg rename to test/data/iiif_1_1_tiled/512,0,263,512/132,/0/native.jpg diff --git a/test/data/iiif_1_1_files/512,256,256,256/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/512,256,256,256/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/512,256,256,256/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/512,256,256,256/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/512,512,256,256/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/512,512,256,256/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/512,512,256,256/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/512,512,256,256/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/512,512,263,512/132,256/0/native.jpg b/test/data/iiif_1_1_tiled/512,512,263,512/132,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/512,512,263,512/132,256/0/native.jpg rename to test/data/iiif_1_1_tiled/512,512,263,512/132,/0/native.jpg diff --git a/test/data/iiif_1_1_files/512,768,256,256/256,256/0/native.jpg b/test/data/iiif_1_1_tiled/512,768,256,256/256,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/512,768,256,256/256,256/0/native.jpg rename to test/data/iiif_1_1_tiled/512,768,256,256/256,/0/native.jpg diff --git a/test/data/iiif_1_1_files/768,0,7,256/7,256/0/native.jpg b/test/data/iiif_1_1_tiled/768,0,7,256/7,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/768,0,7,256/7,256/0/native.jpg rename to test/data/iiif_1_1_tiled/768,0,7,256/7,/0/native.jpg diff --git a/test/data/iiif_1_1_files/768,256,7,256/7,256/0/native.jpg b/test/data/iiif_1_1_tiled/768,256,7,256/7,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/768,256,7,256/7,256/0/native.jpg rename to test/data/iiif_1_1_tiled/768,256,7,256/7,/0/native.jpg diff --git a/test/data/iiif_1_1_files/768,512,7,256/7,256/0/native.jpg b/test/data/iiif_1_1_tiled/768,512,7,256/7,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/768,512,7,256/7,256/0/native.jpg rename to test/data/iiif_1_1_tiled/768,512,7,256/7,/0/native.jpg diff --git a/test/data/iiif_1_1_files/768,768,7,256/7,256/0/native.jpg b/test/data/iiif_1_1_tiled/768,768,7,256/7,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/768,768,7,256/7,256/0/native.jpg rename to test/data/iiif_1_1_tiled/768,768,7,256/7,/0/native.jpg diff --git a/test/data/iiif_1_1_files/full/1,1/0/native.jpg b/test/data/iiif_1_1_tiled/full/1,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/full/1,1/0/native.jpg rename to test/data/iiif_1_1_tiled/full/1,/0/native.jpg diff --git a/test/data/iiif_1_1_files/full/13,16/0/native.jpg b/test/data/iiif_1_1_tiled/full/13,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/full/13,16/0/native.jpg rename to test/data/iiif_1_1_tiled/full/13,/0/native.jpg diff --git a/test/data/iiif_1_1_files/full/2,2/0/native.jpg b/test/data/iiif_1_1_tiled/full/2,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/full/2,2/0/native.jpg rename to test/data/iiif_1_1_tiled/full/2,/0/native.jpg diff --git a/test/data/iiif_1_1_files/full/25,32/0/native.jpg b/test/data/iiif_1_1_tiled/full/25,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/full/25,32/0/native.jpg rename to test/data/iiif_1_1_tiled/full/25,/0/native.jpg diff --git a/test/data/iiif_1_1_files/full/4,4/0/native.jpg b/test/data/iiif_1_1_tiled/full/4,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/full/4,4/0/native.jpg rename to test/data/iiif_1_1_tiled/full/4,/0/native.jpg diff --git a/test/data/iiif_1_1_files/full/49,64/0/native.jpg b/test/data/iiif_1_1_tiled/full/49,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/full/49,64/0/native.jpg rename to test/data/iiif_1_1_tiled/full/49,/0/native.jpg diff --git a/test/data/iiif_1_1_files/full/7,8/0/native.jpg b/test/data/iiif_1_1_tiled/full/7,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/full/7,8/0/native.jpg rename to test/data/iiif_1_1_tiled/full/7,/0/native.jpg diff --git a/test/data/iiif_1_1_files/full/97,128/0/native.jpg b/test/data/iiif_1_1_tiled/full/97,/0/native.jpg similarity index 100% rename from test/data/iiif_1_1_files/full/97,128/0/native.jpg rename to test/data/iiif_1_1_tiled/full/97,/0/native.jpg diff --git a/test/data/iiif_no_tiles/0,0,1024,850/128,107/0/native.jpg b/test/data/iiif_no_tiles/0,0,1024,850/128,107/0/native.jpg deleted file mode 100644 index e0bacd02..00000000 Binary files a/test/data/iiif_no_tiles/0,0,1024,850/128,107/0/native.jpg and /dev/null differ diff --git a/test/data/iiif_no_tiles/0,0,1024,850/256,213/0/native.jpg b/test/data/iiif_no_tiles/0,0,1024,850/256,213/0/native.jpg deleted file mode 100644 index 6c8c5441..00000000 Binary files a/test/data/iiif_no_tiles/0,0,1024,850/256,213/0/native.jpg and /dev/null differ diff --git a/test/data/iiif_no_tiles/0,0,1024,850/32,27/0/native.jpg b/test/data/iiif_no_tiles/0,0,1024,850/32,27/0/native.jpg deleted file mode 100644 index f97752d8..00000000 Binary files a/test/data/iiif_no_tiles/0,0,1024,850/32,27/0/native.jpg and /dev/null differ diff --git a/test/data/iiif_no_tiles/0,0,1024,850/512,425/0/native.jpg b/test/data/iiif_no_tiles/0,0,1024,850/512,425/0/native.jpg deleted file mode 100644 index c3300449..00000000 Binary files a/test/data/iiif_no_tiles/0,0,1024,850/512,425/0/native.jpg and /dev/null differ diff --git a/test/data/iiif_no_tiles/0,0,1024,850/64,54/0/native.jpg b/test/data/iiif_no_tiles/0,0,1024,850/64,54/0/native.jpg deleted file mode 100644 index ad7f30c8..00000000 Binary files a/test/data/iiif_no_tiles/0,0,1024,850/64,54/0/native.jpg and /dev/null differ diff --git a/test/data/iiif_no_tiles/full/full/0/native.jpg b/test/data/iiif_no_tiles/full/full/0/native.jpg deleted file mode 100644 index dcc1d22b..00000000 Binary files a/test/data/iiif_no_tiles/full/full/0/native.jpg and /dev/null differ diff --git a/test/formats.js b/test/formats.js index 9cabf816..7a54048f 100644 --- a/test/formats.js +++ b/test/formats.js @@ -77,12 +77,27 @@ // ---------- asyncTest('IIIF 1.1 JSON', function() { - testOpen('iiif1_1.json'); + testOpen('iiif_1_1_tiled.json'); }); - // ---------- - asyncTest('IIIF No Tiles', function() { - testOpen('iiif_no_tiles.json'); + // ---------- + asyncTest('IIIF No Tiles, Less than 256', function() { + testOpen('iiif_1_1_no_tiles_255.json'); + }); + + // ---------- + asyncTest('IIIF No Tiles, Bet. 256 and 512', function() { + testOpen('iiif_1_1_no_tiles_384.json'); + }); + + // ---------- + asyncTest('IIIF No Tiles, Bet. 512 and 1024', function() { + testOpen('iiif_1_1_no_tiles_768.json'); + }); + + // ---------- + asyncTest('IIIF No Tiles, Larger than 1024', function() { + testOpen('iiif_1_1_no_tiles_1048.json'); }); })();