viewer.addTiledImage why not adding tileSources or tileSource 2 pages?
See original GitHub issuefor (var i = 0; i < len; ++i) {
if (len > 1) {
switch (i) {
case 0:
tiff.setDirectory(i);
var canvas1 = tiff.toCanvas();
var im1 = tiff.toDataURL();
break;
case 1:
tiff.setDirectory(i);
var canvas2 = tiff.toCanvas();
var im2 = tiff.toDataURL();
break;
default:
break;
}
viewer.addTiledImage({
tileSources: [
{
type: "image",
url:im1
},
{
type: "image",
url: im2
}
],
});
}
else {
tiff.setDirectory(i);
var canvas = tiff.toCanvas();
viewer.addTiledImage({
tileSource: {
type: 'image',
url: canvas.toDataURL(),
buildPyramid: false
},
});
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Clarify options for open(), addTiledImage(), and the ... - GitHub
I'm not a huge fan of that, since: var viewer = OpenSeadragon({ tileSources: [{ tileSource: url }] }); ... seems a bit much...
Read more >openseadragon/openseadragon - Gitter
The OSD instance with the tileSource in the original constructor was working fine but ... After 1, count is 2 (the overlay, plus...
Read more >OpenSeadragon & multiple images
This gist demonstrates how to use OpenSeadragon in order to overlap two tiled images and switch between them using an opacity slider control ......
Read more >Class: TiledImage - OpenSeadragon
Handles rendering of tiles for an OpenSeadragon.Viewer . A new instance is created for each TileSource opened. Members, Methods, Events ...
Read more >How to control the loading order of multiple images in ...
You can try using the 'open' event and adding the next image once ... addTiledImage({ tileSource: source[i], index: i, opacity:0 }); viewer.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you are awesome.it worked thank you so much. I’m closing the issue.
This should work: