Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dzsave --tile-width and --tile-height #105

Closed
Juantxor opened this issue Feb 14, 2014 · 9 comments
Closed

dzsave --tile-width and --tile-height #105

Juantxor opened this issue Feb 14, 2014 · 9 comments

Comments

@Juantxor
Copy link

I would like to use tile size non square: --tile-width and --tile-height (using --layout google) but it doesn't work. Are these options deprecated? Any chance it works?

@jcupitt
Copy link
Member

jcupitt commented Feb 15, 2014

I guess we could put tile-width and tile-height back again if there really is a use for non-square tiles. Is this a common requirement, do you know? I'll have a look at the code again.

@Juantxor
Copy link
Author

Sorry I suppose is not a common requirement. I don't know...I'm working using landscape photos with google maps and all the photos are non-square. I saw your deprecated variables and I was curious if they could work. Anyway thank you very much for the vips library. Fantastic work!

@jcupitt
Copy link
Member

jcupitt commented Feb 15, 2014

But would there be an advantage to non-square tiles? I'm not sure I see a technical need for them, and it would add complication.

Thank you for your kind words about vips, it's always nice to get feedback.

@Juantxor
Copy link
Author

Just don't use background color I suppose...

@Juantxor
Copy link
Author

I'm not good using libraries. I know a bit of ruby only. What commands I should use to tile a giga image for google maps (in non square tiles).
Maybe
vips tiffsave source_image output_image.tif --tile --pyramid --compression deflate--tile-width 100--tile-height 200
to tile and after some commands to extract tiles of each level of zoom?

@jcupitt
Copy link
Member

jcupitt commented Feb 25, 2014

Hi again, I've been on holiday, sorry for the pause.

The current dzsave will only do square tiles --- you'd need to change the C if you really wanted non-square tiles.

vips can make two basic sorts of image pyramid. tiffsave can make a tiled tiff pyramid, useful with IIPImage and a few other programs. This is a single tiff image file containing all of the tiles wrapped up together. This pyramid writer supports non-square tiles.

dzsave can make google / deepzoom / zoomify pyramids. These are large directory trees containing one tile per file, usually in jpeg format. They work with things like seadragon and openzoom. This pyramid writer only supports square tiles.

If you want to work with google maps you need something like:

vips dzsave my_huge_image.tif myoutputdir --layout google

and it'll write a set of tiles to a directory called myoutputdir. Put this directory on your webserver and embed the google maps viewer in your web page.

@Juantxor
Copy link
Author

Thank you very much!

@kjell
Copy link

kjell commented Feb 26, 2014

My use case for non-square tiles is zooming photographs with dimensions that don't divide by 256. (Explicitly setting tile width and height would be a pain for me, this just short-circuits the code that pads edge tiles to 256)

The tiles end up like this

I think this looks better than bordering the image.

I have a fork of libvips with another small change to save tiles as z/x/y.

@Juantxor
Copy link
Author

Fantastic! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants