These are chat archives for openseadragon/openseadragon

Apr 2017
Apr 20 2017 06:01

Thanks Ian. Vips worked very well. Now, I am its fan too. I have another question.
I am generating pixel based image of high resolution where each pixel color is representing some information. I then generate deep zoom tiles through vips and show it in the open sea dragon viewer. The problem i am getting is that in the open sea dragon viewer when i am zooming down pixels seems to be distorted. In the original image if i zoomed in, at the lowest zoom in level i can clearly see pixels. In the generated deep zoom tiles as well, at the highest tile level each tile image can be zoomed in to see clear pixels. Why open sea dragon not showing clear pixels at the zoom in?
Here is what i am using for open sea dragon viewer

viewer = OpenSeadragon({
id: "contentDiv",
prefixUrl: "/openseadragon/images/",
toolbar: "toolbarDiv",
visibilityRatio: 1,
constrainDuringPan: true,
// panHorizontal: false,
defaultZoomLevel: 0,
minZoomLevel: 0,
maxZoomLevel: 100,
showNavigator: true,
navigatorPosition: "TOP_RIGHT",
wrapHorizontal: false,
animationTime: 2,
springStiffness: 5,
sequenceMode: true,
tileSources: [

Original image:

Here are the deep zoom tiled images.

I zoomed in one of the highest level tiles images to show how each pixel is looking at zoom in. (i took tile of level 13, 4_3)

This image is zoomed in open sea dragon image:

Please let me know how i can see clear pixels at zoom in in open sea dragon. Thank You so much.

Apr 20 2017 08:58
I try to find a solution and find that open sea dragon is using an interpolator to upsize images. I want hard pixel edges, but open sea dragon is using something like bilinear (soft edges). am i right? How can i turn off the interpolation? Thanks
Ian Gilman
Apr 20 2017 17:13
@sohaib_ghani_twitter OpenSeadragon uses Canvas and by default Canvas uses a smooth interpolation. You can turn it off with
You'd do something like viewer.drawer.context.imageSmoothingEnabled = false
Apr 20 2017 20:35
Thanks Ian. I will indeed try it.