Skip to content

Commit

Permalink
Testing Ruven's fix
Browse files Browse the repository at this point in the history
  • Loading branch information
glenrobson committed Apr 27, 2023
1 parent eeb35b6 commit f0fae8c
Show file tree
Hide file tree
Showing 290 changed files with 24,796 additions and 1 deletion.
12 changes: 11 additions & 1 deletion rounding_issue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,14 @@ Working on the following ticket to do with rounding issues:
OSD examples:

* [Version 3.1.0](osd-3.1.0.html?image=https://glenrobson.github.io/iiif_stuff/rounding_issue/odd/info.json)
* [Version 4.0.0](osd-4.0.0.html?image=https://glenrobson.github.io/iiif_stuff/rounding_issue/odd/info.json)
* [Version 4.0.0](osd-4.0.0.html?image=https://glenrobson.github.io/iiif_stuff/rounding_issue/odd/info.json)
* [Ruven's fix](osd-ruven.html?image=https://glenrobson.github.io/iiif_stuff/rounding_issue/odd/info.json) [pull request](https://github.com/openseadragon/openseadragon/pull/2337)
* Tested:
* Fixture image with no sizes [view](osd-ruven.html?image=https://iiif.io/api/image/3.0/example/reference/28473c77da3deebe4375c3a50572d9d3-laocoon/info.json)
* Smithsonian image with no sizes [view](osd-ruven.html?image=https://ids.si.edu/ids/iiif/AAA-jacqself00001/info.json)
* Odd dimensions image [view](osd-ruven.html?image=https://glenrobson.github.io/iiif_stuff/rounding_issue/odd/info.json)
* Odd v3 fixtures (no sizes) [view](osd-ruven.html?image=https://iiif.io/api/image/3.0/example/reference/84fe52eee7ec9b64f6f35909572ebf36-odd/info.json)
* Odd v2 fixtures (no sizes) [view](osd-ruven.html?image=https://iiif.io/api/image/2.1/example/reference/84fe52eee7ec9b64f6f35909572ebf36-odd/info.json)
* Odd v1 fixtures (no sizes) [view](osd-ruven.html?image=https://iiif.io/api/image/1.0/example/reference/84fe52eee7ec9b64f6f35909572ebf36-odd/info.json)
* Image from Simeon's tiler [view](osd-ruven.html?image=https://glenrobson.github.io/iiif/welsh_book/page001/info.json)
* Odd image no sizes array [view](osd-ruven.html?image=https://glenrobson.github.io/iiif_stuff/rounding_issue/odd-no-sizes/info.json)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions rounding_issue/odd-no-sizes/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"tiles" : [ {
"scaleFactors" : [ 16, 8, 4, 2, 1 ],
"width" : 256,
"height" : 256
} ],
"protocol" : "http://iiif.io/api/image",
"profile" : "http://iiif.io/api/image/2/level0.json",
"width" : 3073,
"@id" : "https://glenrobson.github.io/iiif_stuff/rounding_issue/odd",
"@context" : "http://iiif.io/api/image/2/context.json",
"height" : 3073
}
24,680 changes: 24,680 additions & 0 deletions rounding_issue/openseadragon-bin-ruven/openseadragon.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions rounding_issue/openseadragon-bin-ruven/openseadragon.min.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

81 changes: 81 additions & 0 deletions rounding_issue/osd-ruven.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<html>
<head>
<meta charset='utf-8'>

<title>OpenSeadragon Ruven's fix</title>

<script src="openseadragon-bin-ruven/openseadragon.js"></script>
</head>

<body>
<div id="osd" style="width: 100%; height: 100%;"></div>
<script type="text/javascript">
function getAllUrlParams(url) {

// get query string from url (optional) or window
var queryString = url ? url.split('?')[1] : window.location.search.slice(1);

// we'll store the parameters here
var obj = {};

// if query string exists
if (queryString) {

// stuff after # is not part of query string, so get rid of it
queryString = queryString.split('#')[0];

// split our query string into its component parts
var arr = queryString.split('&');

for (var i=0; i<arr.length; i++) {
// separate the keys and the values
var a = arr[i].split('=');

// in case params look like: list[]=thing1&list[]=thing2
var paramNum = undefined;
var paramName = a[0].replace(/\[\d*\]/, function(v) {
paramNum = v.slice(1,-1);
return '';
});

// set parameter value (use 'true' if empty)
var paramValue = typeof(a[1])==='undefined' ? true : a[1];

// if parameter name already exists
if (obj[paramName]) {
// convert value to array (if still string)
if (typeof obj[paramName] === 'string') {
obj[paramName] = [obj[paramName]];
}
// if no array index number specified...
if (typeof paramNum === 'undefined') {
// put the value on the end of the array
obj[paramName].push(paramValue);
}
// if array index number specified...
else {
// put the value at that index number
obj[paramName][paramNum] = paramValue;
}
}
// if param name doesn't exist yet, set it
else {
obj[paramName] = paramValue;
}
}
}

return obj;
}

OpenSeadragon({
id: "osd",
prefixUrl: "openseadragon-bin-ruven/images/",
preserveViewport: true,
visibilityRatio: 1,
sequenceMode: true,
tileSources: [getAllUrlParams().image]
});
</script>
</body>
</html>

0 comments on commit f0fae8c

Please sign in to comment.