These are chat archives for openseadragon/openseadragon

28th
Sep 2016
Antoine Vandecreme
@avandecreme
Sep 28 2016 07:32

Is there a way to get the best zoom level for a given zoom value?

Do you mean zoom level = tile level?

@dehuszar ^
Andreas Wagner
@anwagnerdreas_twitter
Sep 28 2016 09:18
Hi all. I am using OpenSeadragon Viewer 2.2 with a legacy-image-pyramid, but at the url there's a 303 redirection and I get no image. Should OSD handle the redirect and I have a bug elsewhere or is redirection not supported?
Antoine Vandecreme
@avandecreme
Sep 28 2016 09:26
my guess would be the redirection is the issue
is there any message in the console?
Andreas Wagner
@anwagnerdreas_twitter
Sep 28 2016 09:29
The first of the messages says unsupported image format. There's a content negotiation going on before the redirection takes place. Do you know (or how can I find out) what the Accept header of the image request is?
Andreas Wagner
@anwagnerdreas_twitter
Sep 28 2016 11:03
Got it. It seems to check the image format before the actual download (with regexes on either the url/filename or the mimetype). Since the actual image is not known before content negotiation, I have neither a telling url nor a mimetype. When I make filename check pass always - by simply replacing the regex from "/^..(png|jpg|jpeg|gif)$/" to "/^.$/" (without the quotes) -, it miraculously works.
BTW, now that the request reaches the server, I can see the accept header: "Accept: image/webp,image/,/*;q=0.8"
Andreas Wagner
@awagner-mainz
Sep 28 2016 12:32
fwiw, the regexes and accept header got some backslashes and asterisks eaten away by the styling markdown because I am too dumb to properly escape them. Also, I have opened a feature request for this. (Maybe for some future version, if it is of any help for other users beyond myself): openseadragon/openseadragon#1042
John Hoffer
@thejohnhoffer
Sep 28 2016 13:40

Do you mean zoom level = tile level?

Yes: now I'm using tileLevel = Math.ceil(Math.log2(zoom))to make sure the viewer waits until the needed tileLevelis loaded for a new tiledImage before showing it in full multi-image.

John Hoffer
@thejohnhoffer
Sep 28 2016 13:50
This message was deleted
John Hoffer
@thejohnhoffer
Sep 28 2016 14:43
I'm trying to understand the order in which tile levels are loaded starting at line 19441 in the private function updateViewport
John Hoffer
@thejohnhoffer
Sep 28 2016 14:57
Pseudocode:
best := null
from (highestLevel to lowestLevel) {
      best := best of all tiles at this level
      break if lower level already has full data for viewport
}
load(best)
John Hoffer
@thejohnhoffer
Sep 28 2016 15:04
This message was deleted
John Hoffer
@thejohnhoffer
Sep 28 2016 15:15
Can anyone help me understand the reasoning behind the break if at the line 19500 call to providesCoverage?
John Hoffer
@thejohnhoffer
Sep 28 2016 15:43
The problem I have with this approach is evident when creating a viewer with the option defaultZoomLevel: 4.00. In this case the viewport shows only a very small portion of the tiledImage, so I would prefer that the highest resolution tiles are actually loaded before the lower resolution tiles that include the viewport and the surroundings.
Patrick Liechty
@patrickliechty
Sep 28 2016 22:55
I am upgrading to the latest version and I see in the release notes that contentAspectX and contentAspectY have been removed. What can I use in place of those 2 properties?
Alexey Tikhonov
@altert
Sep 28 2016 23:08
contentAspectRatio ?
it’s private though
Patrick Liechty
@patrickliechty
Sep 28 2016 23:09
I looked at that and it appears to be X/Y
Not what I want
Alexey Tikhonov
@altert
Sep 28 2016 23:10
but it’s basically what contentAspectX was
Patrick Liechty
@patrickliechty
Sep 28 2016 23:14
I need to know the aspect ratio of the height
I am looking for a different way to do what I used to do, but not finding it yet
Alexey Tikhonov
@altert
Sep 28 2016 23:15
well isn’t it 1/contentAspectRatio?
Patrick Liechty
@patrickliechty
Sep 28 2016 23:24
I will check on that
Patrick Liechty
@patrickliechty
Sep 28 2016 23:35
Another issue. I am creating an overlay and it appears to be going under the image or canvas. It flashes then when the image comes in it disappears