dimsemenov / photoswipe-deep-zoom-plugin

High-resolution tile-based image zoom plugin for PhotoSwipe
55 stars 7 forks source link

Generating images for the tilesets #3

Closed shr-sys closed 1 year ago

shr-sys commented 1 year ago

I am really trying to make this plugin work for my use case, but the part which I'm unable to understand is how to generate these images like you have done in the demo image folder. I just have one single image that i wish to enable deep zoom features on and pass your plugin as a prop through react-photoswipe component, is it possible to explain how do i go about doing that ?

dimsemenov commented 1 year ago

You'll need to generate tiles in Deepzoom or Zoomify format via some server-side tool. There are multiple of them, personally, I used vips https://www.libvips.org/API/current/Making-image-pyramids.html

shr-sys commented 1 year ago

Thank you so much, i will use this the next time ! I went down a rabbit hole and used a very old tool 'Deep zoom composer' worked out for me. Thank you for the resource ! I had one more concern, while using the npm package for the plugin i seem to get an error while importing(inside react).

image

dimsemenov commented 1 year ago

The deep zoom plugin is not a TypeScript component, you can check guides like https://medium.com/@steveruiz/using-a-javascript-library-without-type-declarations-in-a-typescript-project-3643490015f3

shr-sys commented 1 year ago

I am currently not using typescript in any of my projects, this is just plain create react app 🤔

shr-sys commented 1 year ago

image

I ran your exact repo in my dev environment with my own image set (generated via the tool you recommened), but upon zooming iam getting this white patch on one corner of the zoomed in variant.

Using the same image set in openseadragon the zoomed in variant is slightly whiter compared to the parent image (just like the white patch in deepzoom plugin).

Only a small patch is white while using your plugin, but using openseadragon the entire image is rendered in white.

is this something that you can assist with in regards to the image processing tool you recommended ? any help would be appreciated and thanks for the overall help provided.

shr-sys commented 1 year ago

Hi sorry thank you for your time, the issue was resolved it was a problem with the image color format (CYMK). Had to convert it into RGB for vips to render exact image. Closing the issue now !