These are chat archives for openseadragon/openseadragon

13th
Jan 2016
Alexey Tikhonov
@altert
Jan 13 2016 00:19
here is an implementation of openseadragon for resourcespace in action
Ian Gilman
@iangilman
Jan 13 2016 00:24
Cool! Those are 4 separate images?
Alexey Tikhonov
@altert
Jan 13 2016 00:27
ys
Ian Gilman
@iangilman
Jan 13 2016 00:27
Excellent. If only they had more pixels!
Alexey Tikhonov
@altert
Jan 13 2016 00:27
I'm sorry, it's only i russian, but you can click on loupe icon and execute search there
Ian Gilman
@iangilman
Jan 13 2016 00:28
No worries :)
I like the different arrangement modes
Can we add it to our examples page?
Alexey Tikhonov
@altert
Jan 13 2016 00:29
this version is using legacy multi image sources that were there before, but I hope to upload some high res at a time (most likely using iipimage server). In house we have everything in high-res (deepzoom based)
sure
Ian Gilman
@iangilman
Jan 13 2016 00:29
Excellent :)
Alexey Tikhonov
@altert
Jan 13 2016 00:30
I'll post a link to plugin svn as well when it will become available
I also made wordpress plugin to use openseadragon: http://altert.net/demo/
it's not yet on wordpress.org, but should arrive pretty soon
Ian Gilman
@iangilman
Jan 13 2016 00:33
Awesome. We don't really have a place for those on the website yet, but we really should! Here is the ticket for that: openseadragon/site-build#59 ...I've added yours
Alexey Tikhonov
@altert
Jan 13 2016 00:36
btw, thanks for the great support on issue tracker, the feature I was struggling with is kind of image clipping/screenshot, it's alive on virtual museum site - scissors icon. thanks to you and avandecreme I've quickly sorted it out
Ian Gilman
@iangilman
Jan 13 2016 00:37
Good to hear :)
Matthias Guth
@ChiSamurai
Jan 13 2016 08:19
This message was deleted
@iangilman , @avandecreme: many thanks for your work on the rotation issue. Sorry for that late "thank you" but things had been quite busy the last weeks... as usual before christmas vacations :)
Mark Ehle
@librarymark
Jan 13 2016 15:16
Folks - I am having trouble trying to load jpg's in multi-image mode. Can someone point me to an example? viewer.addTiledImage does not seem to work with images.
VoidVolker
@VoidVolker
Jan 13 2016 16:46
@librarymark how you sliced image?
@librarymark try this script: https://github.com/VoidVolker/MagickSlicer
it contains example page
Mark Ehle
@librarymark
Jan 13 2016 17:28
VoidVOlker - thanks - I am trying to use plain JPG's, not any tile source. I can load them when I create the viewer. How do I add them after the fact?
Ian Gilman
@iangilman
Jan 13 2016 17:32
@ChiSamurai :thumbsup: :)
@librarymark You still need to use a tile source of some sort. Either LegacyTileSource (if you have a pyramid of images) or ImageTileSource (if it's just single images).
Actually depending on how many images you want to load, you might stick with LegacyTileSource anyway because of #813
With LegacyTileSource, you need to know the dimensions of your image ahead of time...do you have that info?
ImageTileSource is definitely the easiest to start with...
Mark Ehle
@librarymark
Jan 13 2016 17:40
So - there is no way to load a tilesource of type image (just a jpeg) using addTiledImage? I am trying to create a duplicate of a cooliris image wall (minus the cool 3d stuff).
Ian Gilman
@iangilman
Jan 13 2016 17:41
@librarymark Yes, with ImageTileSource
viewer.addTiledImage({
    tileSource: {
        type: 'image',
        url:  'http://openseadragon.github.io/example-images/grand-canyon-landscape-overlooking.jpg'
    }
});
@avandecreme I suppose we could make a viewer.addSimpleImage(url) that's just an alias to the above code...
VoidVolker
@VoidVolker
Jan 13 2016 17:51
@librarymark you can load image to page without OSD
Mark Ehle
@librarymark
Jan 13 2016 17:54
OSD?
Can you specify the location with addTiledImage?
VoidVolker
@VoidVolker
Jan 13 2016 17:55
OpenSeaDragon
Mark Ehle
@librarymark
Jan 13 2016 17:55
Oh. Duh.
Ian Gilman
@iangilman
Jan 13 2016 18:02
@librarymark Yes, you can specify x, y and width (and it'll figure out height) to addTiledImage
Remember it's in viewport coordinates: http://openseadragon.github.io/examples/viewport-coordinates/
More info on what you can give to addTiledImage: http://openseadragon.github.io/docs/OpenSeadragon.Viewer.html#addTiledImage
Antoine Vandecreme
@avandecreme
Jan 13 2016 19:08
@iangilman yup adding addSimpleImage would make the API easier to use for new users
Ian Gilman
@iangilman
Jan 13 2016 19:09
:thumbsup:
...and it'll justify the name of addTiledImage ;)
Mark Ehle
@librarymark
Jan 13 2016 19:23
Ah. I've got it working now. That gets me quite a bit farther - thanks!
Ian Gilman
@iangilman
Jan 13 2016 19:23
Excellent :)
Mark Ehle
@librarymark
Jan 13 2016 19:48

Ok - now I've got some rows of images. Now what I need is how to 1) hide it while everything s loading, and 2) position the wall of images so it's zoomed to the height of the rows and starting at the left-most edge.

Thanks again for everyone's help!

Ian Gilman
@iangilman
Jan 13 2016 19:54
@librarymark You can set the opacity of images if you want them hidden for a bit
As for positioning, you want to move the viewport. I assume you know where the images are located in viewport coordinates? If so, make an OpenSeadragon.Rect with the coordinates of the left side and use it in viewer.viewport.fitBounds()
I'm heading off to lunch...I can answer more questions in a bit if you need
You'll probably want to get to know the World and TiledImage objects. For instance, to set the opacity of the first image to 0 (invisible), you would do viewer.world.getItemAt(0).setOpacity(0)
Mark Ehle
@librarymark
Jan 13 2016 20:00
Thanks so much for the help! This is wonderful!
Ian Gilman
@iangilman
Jan 13 2016 21:50
:thumbsup:
Grant Echols
@gechols
Jan 13 2016 22:14
In the filterFiles function (https://github.com/openseadragon/openseadragon/blob/master/src/legacytilesource.js#L218-L220) the mime type is discovered by checking the final characters of the string using a regular expression. I have a strange situation where I need to provide session information on a query string to get access to the images so I'd like to alter the regex to accept/ignore query string content after the file extension. Before I delve into this is there likely to be a ton of other problems with additional query content I might run into?
Ian Gilman
@iangilman
Jan 13 2016 22:20
@gechols The only thing I can think of is that sometimes the extension will be in the query string, like http://example.com?img=foo.jpg
Ian Gilman
@iangilman
Jan 13 2016 22:27
It looks like we're just checking to see if it has an extension that matches what we want...I suppose we could just check the whole URL instead of the very end
It's just a sanity check, so it can be a little lax
Grant Echols
@gechols
Jan 13 2016 22:44
Ya - our string looks more like http://host.com/image.jpg?session=something
The .jpg? is still in there, but not at the end of the string
Ian Gilman
@iangilman
Jan 13 2016 22:46
What do you think about just removing the $ from the regex?
Or we could include a search for ? as well?
I suppose that would be the least invasive
i.e. if the extension is at the end or if it's just before a ?
Grant Echols
@gechols
Jan 13 2016 22:53
I've got the following regex and it seems to work: ^..(png|jpg|jpeg|gif)(?:\?.)$
It lets the extension be at the end of the string or right before the query
I'm going to prepare a PR to contribute it unless there's serious misgivings about it
Ian Gilman
@iangilman
Jan 13 2016 22:58
Sounds good...please do!