These are chat archives for openseadragon/openseadragon

29th
Jul 2016
Flexflexible
@Flexflexible_twitter
Jul 29 2016 06:22

@iangilman
It's really basic at the moment. When I trigger the mousewheel I simply change the width of the #flipbook Container. Seems to work well with OSD and deepzoom Images. Is OSD using css based "zoom" is is that achieved with pure javascript?

Will try to create some sample .dzi files and see if all works as intendet.
Really appreciate the help so far, thanks @iangilman

Ian Gilman
@iangilman
Jul 29 2016 16:13
@Flexflexible_twitter OSD pays attention to the size of its container and resizes itself appropriately, but it's all done in JavaScript
Glad to hear it's working well so far!
Even so, if the images you're dealing with are never zoomed into more than the width of your window, you might not need deep zoom
Sounds like a neat project... I'd love to check it out sometime!
Ian Gilman
@iangilman
Jul 29 2016 16:59
Anyone know where to find some TMS tiles we can use for our demo? openseadragon/site-build#145
Antoine Vandecreme
@avandecreme
Jul 29 2016 17:03
I remember it already went down a year or two ago. Back then, I found someone on some osgeo IRC channel who restarted the server for us. :D
Ian Gilman
@iangilman
Jul 29 2016 17:04
Interesting...
Do you want to try poking them again, or shall I?
Antoine Vandecreme
@avandecreme
Jul 29 2016 17:04
I'm a bit lazy this time, sorry :)
Ian Gilman
@iangilman
Jul 29 2016 17:05
No worries... can you point me to the channel?
Antoine Vandecreme
@avandecreme
Jul 29 2016 17:05
not really
I guess I found it on their website
Ian Gilman
@iangilman
Jul 29 2016 17:06
Fair enough :)
I'll poke around
Ian Gilman
@iangilman
Jul 29 2016 17:11
@avandecreme Btw, have you taken a look at openseadragon/openseadragon#987 ?
(it's following up on an issue you had partially tracked down)
VoidVolker
@VoidVolker
Jul 29 2016 17:12
@iangilman what about gitlabs?
@iangilman yeah, I sended link to him
also, github allow to store large files there automatically
Ian Gilman
@iangilman
Jul 29 2016 17:16
Yeah, maybe having our own set of TMS tiles might be the way to go... we're already storing a lot of tiles on https://github.com/openseadragon/example-images
VoidVolker
@VoidVolker
Jul 29 2016 17:17
@iangilman looks like you find bug with simple image?
Ian Gilman
@iangilman
Jul 29 2016 17:18
Yeah, looks like it was already a bug but your patch modifies the bug's behavior, so I thought it might be worth your taking a look at it
Might be pretty straight forward given the research you've already done
The thing about those tile sources is that they only have one tile per level
VoidVolker
@VoidVolker
Jul 29 2016 17:18
yeah, I'll check it
Ian Gilman
@iangilman
Jul 29 2016 17:19
Awesome, thank you :)
VoidVolker
@VoidVolker
Jul 29 2016 17:25
mm... image not loading...
Ian Gilman
@iangilman
Jul 29 2016 17:26
You can just use any image
var tileSource = {
    type: "image",
    url: "http://iangilman.com/osd/test/data/A.png"
};
... that should work
VoidVolker
@VoidVolker
Jul 29 2016 17:27
ah, yes, checked docks
Ian Gilman
@iangilman
Jul 29 2016 17:27
Of course you have to pass it into the tileSources option when you create the viewer
VoidVolker
@VoidVolker
Jul 29 2016 17:29
        getTileAtPoint: function (level, point) {
            return new $.Point(0, 0);
        }
fixed
just use same code
Ian Gilman
@iangilman
Jul 29 2016 17:29
Make sense, since there's only one tile per level
Nice :)
VoidVolker
@VoidVolker
Jul 29 2016 17:30
looks like need to check other tile sources
Ian Gilman
@iangilman
Jul 29 2016 17:31
IIIFTileSource seemed good, and OSMTileSource
I don't have any data for TSMTileSource...
do look at LegacyTileSource though
VoidVolker
@VoidVolker
Jul 29 2016 17:31
yes, they all uses tiledimage.prototype
in legacytilesource same code
what if I just do link to $.TileSource.prototype.getTileAtPoint there?
instead copy-paste code
Ian Gilman
@iangilman
Jul 29 2016 17:32
Yes, that's preferable
Also, if you're replacing the entire function, you can just remove the function entirely and it'll just inherit from TileSource
VoidVolker
@VoidVolker
Jul 29 2016 17:33
and in legaci I'll do same
Ian Gilman
@iangilman
Jul 29 2016 17:35
Cool
VoidVolker
@VoidVolker
Jul 29 2016 17:36
done
now need only make reset of bounds position
Ian Gilman
@iangilman
Jul 29 2016 17:37
Cool. Maybe that should be a second patch?
VoidVolker
@VoidVolker
Jul 29 2016 17:37
o! yes, we need to do coords reset
I don't know where to do this )
basically, it is just: x = newx % width
Ian Gilman
@iangilman
Jul 29 2016 17:38
It definitely seems like a higher level thing...
VoidVolker
@VoidVolker
Jul 29 2016 17:39
yes, it must be done in some function, what do scroll
Ian Gilman
@iangilman
Jul 29 2016 17:39
Animation complicates it...
VoidVolker
@VoidVolker
Jul 29 2016 17:39
yes, this code must be added to animation/scroll function, what change the coords/bounds
Ian Gilman
@iangilman
Jul 29 2016 17:40
That's all in Viewport
VoidVolker
@VoidVolker
Jul 29 2016 17:42
hmm... panTo?
Ian Gilman
@iangilman
Jul 29 2016 17:44
Yes, and anywhere else the centerSpringX and centerSpringY are changed
update, for instance
VoidVolker
@VoidVolker
Jul 29 2016 17:50
looks like I found reason of lag in rendering last row/lines: OSD start render image from center - it loads low res tiles, then load hi res tiles from the middle to borders, and after loading and rendering all tiles it render border tiles
Ian Gilman
@iangilman
Jul 29 2016 17:51
Cool, that's the desired behavior
VoidVolker
@VoidVolker
Jul 29 2016 17:52
looks like updateLevel calls after all tiles load
or, osd render low res tiles, then call updateLevel
I think need add there logic for wrap case - to render all tiles
Ian Gilman
@iangilman
Jul 29 2016 17:54
Doesn't the low res tile cover the whole surface? I guess I'm not sure what the issue is
VoidVolker
@VoidVolker
Jul 29 2016 17:55
one moment
Ian Gilman
@iangilman
Jul 29 2016 18:06
@VoidVolker Regarding resetting the coordinates, one of the things that makes it funky is the relationship between the viewport and the images within it. For instance, you could have three images in the world, and they could each have different sizes and positions. What if only one of those images was set to wrap? You wouldn't want to keep resetting the viewport in that case.
VoidVolker
@VoidVolker
Jul 29 2016 18:07
need example
Ian Gilman
@iangilman
Jul 29 2016 18:07
Setting wrap at an image level isn't supported yet, so maybe that's not a realistic scenario. You could imagine having multiple images that all wrap, and the ones above are semi-transparent in some way or another.
VoidVolker
@VoidVolker
Jul 29 2016 18:07
I never worked with more 1 image
Ian Gilman
@iangilman
Jul 29 2016 18:08
If they wrapped at different periods (i.e. they were different sizes) there wouldn't be any good moment to reset the coordinates
Looks like there's a problem with that scenario at the moment: openseadragon/openseadragon#988
Just trying to think through the various possibilities
I don't have an example of this stuff in action, but there are examples of multi-image use of course, like http://letsfathom.com
So I think if we do the resetting it needs to be an option, maybe not the default behavior
VoidVolker
@VoidVolker
Jul 29 2016 18:11
coords reset are failed - it have visible image move
not exaclty move, but somekind of twitch
Ian Gilman
@iangilman
Jul 29 2016 18:12
Gotcha
VoidVolker
@VoidVolker
Jul 29 2016 18:18
i just added it to panTo, looks like need use some more lowlevel functions
Ian Gilman
@iangilman
Jul 29 2016 18:21
Definitely, because of the animation
VoidVolker
@VoidVolker
Jul 29 2016 18:22
strange, I can't make multiimae
Ian Gilman
@iangilman
Jul 29 2016 18:22
Did you take a look at the code in #988?
I'm not trying to sidetrack you with the multi-image thing though... just pointing out edge cases to be aware of
Because there can be multiple images, the relationship between image and viewport isn't always direct
VoidVolker
@VoidVolker
Jul 29 2016 18:23
yes, I use same code
[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.
Ian Gilman
@iangilman
Jul 29 2016 18:23
Also even if there's just a single image, its size and position can be changed
Yup, that right there is an example of why it's more complicated with multi-image
I suppose one possibility for the reset feature is to only make it work with single image
(but it probably still needs to keep track of changes to the image size and position to be robust)
VoidVolker
@VoidVolker
Jul 29 2016 18:26
I think, for now we need fix possible bugs with edge cases
then, later we can add coords reset
Ian Gilman
@iangilman
Jul 29 2016 18:27
Sounds reasonable
One step at a time
VoidVolker
@VoidVolker
Jul 29 2016 18:40
cool, I make multi image works
Ian Gilman
@iangilman
Jul 29 2016 18:41
:thumbsup:
VoidVolker
@VoidVolker
Jul 29 2016 18:41
in this case only one image is wrapping
have no idea how to fix it )
Ian Gilman
@iangilman
Jul 29 2016 18:42
#988? It must have to do with the sketch canvas drawing
VoidVolker
@VoidVolker
Jul 29 2016 18:42
lol, after zooming images are change each other )
Ian Gilman
@iangilman
Jul 29 2016 18:43
Interesting
Oh, another thing to play with is rotation...
That could have some interesting effects with wrapping as well
Here's where the sketch canvas stuff comes into play https://github.com/openseadragon/openseadragon/blob/master/src/tiledimage.js#L1423
VoidVolker
@VoidVolker
Jul 29 2016 18:59
blob
Ian Gilman
@iangilman
Jul 29 2016 19:00
I'm off to lunch... back in a bit
VoidVolker
@VoidVolker
Jul 29 2016 19:00
same
funny bug =)
Ian Gilman
@iangilman
Jul 29 2016 19:00
Indeed!
VoidVolker
@VoidVolker
Jul 29 2016 19:01
looks like renderer bug
Ian Gilman
@iangilman
Jul 29 2016 20:12
I imagine it has to do with the sketch canvas
Chris Engberg
@chris-engberg
Jul 29 2016 23:00
Hi Ian and Void, I am trying to find how to change opacity by tileSource index. I was thinking like: viewer.tileSources[0].setOpacity(0.5). Am I far off?
Ian Gilman
@iangilman
Jul 29 2016 23:03
@chris-engberg viewer.world.getItemAt(0).setOpacity(0.5) :)
A tile source is just a data object; the TiledImage is the display object once loaded, and it's stored in the World
Chris Engberg
@chris-engberg
Jul 29 2016 23:05
Thanks!