These are chat archives for openseadragon/openseadragon

11th
Mar 2015
Jeremy Shipman
@jedateach
Mar 11 2015 02:15

@msalsbery thanks for that explanation. I’ll continue with my own code for now, but I assume there might be cause to join forces in some way. As far as I can tell, I’m just wanting a subset of what you’re proposing: A single area which is in what you call “edit mode”, with “grapples”. I’m sure the OpenSeaDragon project would benefit greatly from abstracing out piecies as much as possible, and give things generic names where appropriate.

In my project: once the user has defined the area, the size/position is passed through a request for some back-end handling. The project is not for annotating on top of the image, but actually manipulating it in the back-end.

Richard Kotze
@RichardKotze
Mar 11 2015 11:37
Hello, just want to check if OpenSeadragon supports jpeg 2000?
Tyler Mobley
@mobleyt
Mar 11 2015 13:54
@iangilman OK, double checked, syntax looks OK (I think), but I'm still only seeing overlays if placed outside the tileSources. I assume I'm messing up something obvious. As an addendum, this is getting generated through a PHP loop.
<script type="text/javascript">
    OpenSeadragon({
        id: "contentDiv1",
        prefixUrl: "http://10.7.130.241/omeka/plugins/OpenSeadragon/views/shared/openseadragon/images/",
        showNavigator: true,
        tileSources: [{
            overlays: [{
                px: 4425,
                py: 0,
                width: 6425,
                height: 8535,
                id: 'html-overlay'
            }],
            type: 'legacy-image-pyramid',
            levels: [{
                "url": "http:\/\/10.7.130.241\/omeka\/files\/original\/ec25704d2e8ae8628d89648c515066ac.jpg",
                "width": 5319,
                "height": 6792
            }, {
                "url": "http:\/\/10.7.130.241\/omeka\/files\/fullsize\/ec25704d2e8ae8628d89648c515066ac.jpg",
                "width": 627,
                "height": 800
            }, {
                "url": "http:\/\/10.7.130.241\/omeka\/files\/thumbnails\/ec25704d2e8ae8628d89648c515066ac.jpg",
                "width": 157,
                "height": 200
            }]
        }, {
            overlays: [{
                px: 4425,
                py: 0,
                width: 6425,
                height: 8535,
                id: 'html-overlay'
            }],
            type: 'legacy-image-pyramid',
            levels: [{
                "url": "http:\/\/10.7.130.241\/omeka\/files\/original\/668802eac9a38884af571ab601b19ce4.jpg",
                "width": 5302,
                "height": 6761
            }, {
                "url": "http:\/\/10.7.130.241\/omeka\/files\/fullsize\/668802eac9a38884af571ab601b19ce4.jpg",
                "width": 627,
                "height": 800
            }, {
                "url": "http:\/\/10.7.130.241\/omeka\/files\/thumbnails\/668802eac9a38884af571ab601b19ce4.jpg",
                "width": 157,
                "height": 200
            }]
        }]
    });
</script>        
        <style>
        #html-overlay{
            color: #333;
        }
        </style>
        <div id='html-overlay' style=''>
            Test
        </div>
Ian Gilman
@iangilman
Mar 11 2015 16:13
@RichardKotze OpenSeadragon uses the browser for all image rendering, so if the browser supports an image format, OpenSeadragon supports it. I'm pretty sure that rules out JPEG2000, unfortunately. To support JPEG2000, you'd have to convert to some sort of tile set (of JPEG's or PNG's or whatever) either beforehand or dynamically on the server.
Ian Gilman
@iangilman
Mar 11 2015 16:34
@mobleyt Thanks for the code! Unfortunately I'm having trouble connecting to your server. At any rate, I've tried with a different set of images.
Tyler Mobley
@mobleyt
Mar 11 2015 16:35
@iangilman Ah, sorry, yeah, I'm stuck behind a development firewall at the moment. I should have swapped out the sources.
Ian Gilman
@iangilman
Mar 11 2015 16:36
First up: what version of OSD are you using? Also, is your intention to have these tile sources displayed in a sequence? I assume you're using 1.2.1 and the answer is yes.
No worries...
One thing to try is to use x and y instead of px and py. You'll have to convert to viewer dimensions, of course. A quick hack for testing purposes would be to put 0. in front of all the numbers
Tyler Mobley
@mobleyt
Mar 11 2015 16:37
Correct on both counts.
OK, I will give that s hort.
shot*
Ian Gilman
@iangilman
Mar 11 2015 16:40
Also, you might add a background-color to your #html-overlay style, to make sure you can see it
Mark Salsbery
@msalsbery
Mar 11 2015 16:41
…my second favorite debug hack, after console.log(…) :)
Ian Gilman
@iangilman
Mar 11 2015 16:42
I'm looking at the latest master, and quite a bit has changed there, so your mileage may vary, but for some reason in my version it's ignoring the div with the id and making its own new element with that id
@msalsbery :+1:
Also, theoretically it might be ok to have the same id for the overlay in each tile source, but I think I would feel better if they were different
Another option is to not use an id at all and style it via .openseadragon-overlay
...and of course if none of this works, another option is to ditch the tile source-level overlays and use addOverlay()
Tyler Mobley
@mobleyt
Mar 11 2015 16:50
Hmm yeah no luck on all. I will mess around with addOverlay() for a bit instead. That would still suit my needs. Thanks for your help!
Ian Gilman
@iangilman
Mar 11 2015 16:51
Sorry it's not better :(
Tyler Mobley
@mobleyt
Mar 11 2015 16:53
I'm sure it's close! 70% of the time it's some undiagnosable goof on my end.
Ian Gilman
@iangilman
Mar 11 2015 17:00
:)
Well, I can assure you overlays work somehow ;)
Richard Kotze
@RichardKotze
Mar 11 2015 17:33
@iangilman thank you. Thought that might be the case. ;)
Ian Gilman
@iangilman
Mar 11 2015 18:06
@RichardKotze It's a shame; JPEG2000 is a lovely format.