TIFF File not loading in the Plain Javascript
See original GitHub issue<html>
<body>
<div id="openseadragon1" >
</div>
<script src="tiff.min.js"></script>
<script src="openseadragon.min.js"></script>
<script src="jquery-2.0.3.min.js"></script>
<script src="imaginghelper.js"></script>
<script type="text/javascript">
var viewer = OpenSeadragon({
id: "openseadragon1",
prefixUrl: "images/",
crossOriginPolicy: 'Anonymous',
ajaxWithCredentials: false,
sequenceMode: true,
preload:true,
tileSources: [{
x: 0.883,
y: 1,
width: 100,
tileSource: "file_example_TIFF_1MB.tiff"
},
{
x: 1,
y: 1,
width: 200,
tileSource: "file_example_TIFF_1MB.tiff"
}
]
});
/*viewer.addHandler("page", function (data) {
viewer.open();
viewer.addTiledImage({
tileSource: '20190022.177000.01.tif',
x: 5,
y: 0,
width: 10
});
});*/
function FnOnlcik()
{
alert(11)
}
</script>
</body>
</html>
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Display an image as .tiff or .tif - javascript - Stack Overflow
Displaying Tiff File in angular by displaying the image in the canvas. Download the 'tiff.min.js' from https://github.com/seikichi/tiff.js ...
Read more >How to visualize GeoTIFF images - Luciad Developer Platform
This article describes how to load and visualize GeoTIFF data in LuciadRIA. ... geotiff.js is a small library to parse TIFF files for...
Read more >QuPath not loading pyramid TIFFs properly - Usage & Issues
I'm trying to load large files (at least 3GB in size) in QuPath. Information about the images: (i) Single channel (ii) unsigned 16...
Read more >problem with adding a tiff-file to a map - Esri Community
hello, maybe this is a very simple question, but I'm quite new to ArcGIS: I want to add a shapefile and a tiff-file...
Read more >How to view multipages tiff files using JavaScript or HTML5
Why is my external JavaScript file not working? 29,202 Views · Which is best for building a browser video game: HTML5 Canvas, SVG,...
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
I don’t think OSD currently supports directly loading from canvas (though that’s an interesting feature idea). You would need to convert it to a dataURL and then add the image once it’s ready. Something like so:
BTW, note that I’m providing positioning info with each of the images, but you’re creating the viewer with
sequenceMode: true
, which means it’ll override that positioning info. You can try it both ways to see which you prefer.Also note that I’ve mode
buildPyramid: false
into the tileSource; it’s not a viewer option.Thank you. Your approach works perfectly for me.