Giter Club home page Giter Club logo

dzt's Introduction

DZT

Gem Version Build Status Dependency Status Code Climate

Slice deep-zoom tiled images to be used with OpenSeaDragon or ARTiledImageView.

Usage

gem install dzt

Get Help

dzt help

Tile an Image

dzt slice image.jpg --output tiles

Creates a tiles folder with deep-zoom tiles. This will use the defaults defined in /lib/dzt/tiler.rb.

You can pass in flags to override all these options, such as:

dzt slice image.jpg --output=tiles --format=90 --tile-format=png

Additionally, you can have generated files uploaded to S3 for you. You can specify that like:

dzt slice image.jpg --acl=public-read --bucket=bucket --s3-key=prefix --aws-id=id --aws-secret=secret

The files will be uploaded to the bucket specified, and generated files will be prefixed by the s3 key.

Contributing

See CONTRIBUTING.

Copyright and License

Copyright (c) 2015, Daniel Doubrovkine, Artsy. Some tiling code inspired from deep_zoom_slicer.

This project is licensed under the MIT License.

dzt's People

Contributors

dblock avatar dzucconi avatar joeyaghion avatar mzikherman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dzt's Issues

width or height exceeds limit

dzt slice mosaic_2020.jpg --output=tiles --tile-size=256 --format=jpg

The image height X width = 960px X 1024px. generating tiles perfectly.

But when coming to the image size height X width = 19200px X 28160px

Getting below error, please give me a way solve this issue.

error: width or height exceeds limit mosaic_2020.jpg' @ error/cache.c/OpenPixelCache/3839`

Thanks.

Calling the dzt binary doesn't seem to respect the output folder flag

It always just places the outputted files in a /tiles folder from the current dir.

➜  gravity git:(master) ✗ dzt slice ~/Desktop/skull.jpg     
/Users/mzikherman/Artsy/source/gravity/tiles/11
/Users/mzikherman/Artsy/source/gravity/tiles/10
/Users/mzikherman/Artsy/source/gravity/tiles/9
/Users/mzikherman/Artsy/source/gravity/tiles/8
/Users/mzikherman/Artsy/source/gravity/tiles/7
/Users/mzikherman/Artsy/source/gravity/tiles/6
/Users/mzikherman/Artsy/source/gravity/tiles/5
/Users/mzikherman/Artsy/source/gravity/tiles/4
/Users/mzikherman/Artsy/source/gravity/tiles/3
/Users/mzikherman/Artsy/source/gravity/tiles/2
/Users/mzikherman/Artsy/source/gravity/tiles/1
/Users/mzikherman/Artsy/source/gravity/tiles/0

➜  gravity git:(master) ✗ dzt slice ~/Desktop/skull.jpg /tmp/tiles
/Users/mzikherman/Artsy/source/gravity/tiles/11
/Users/mzikherman/Artsy/source/gravity/tiles/10
/Users/mzikherman/Artsy/source/gravity/tiles/9
/Users/mzikherman/Artsy/source/gravity/tiles/8
/Users/mzikherman/Artsy/source/gravity/tiles/7
/Users/mzikherman/Artsy/source/gravity/tiles/6
/Users/mzikherman/Artsy/source/gravity/tiles/5
/Users/mzikherman/Artsy/source/gravity/tiles/4
/Users/mzikherman/Artsy/source/gravity/tiles/3
/Users/mzikherman/Artsy/source/gravity/tiles/2
/Users/mzikherman/Artsy/source/gravity/tiles/1
/Users/mzikherman/Artsy/source/gravity/tiles/0

DZT command line should properly error out/validate params that are passed in

The second param passed in is actually invalid, and it seems to just get ignored.

➜  gravity git:(master) ✗ dzt slice ~/Desktop/skull.jpg /tmp/tiles
/Users/mzikherman/Artsy/source/gravity/tiles/11
/Users/mzikherman/Artsy/source/gravity/tiles/10
/Users/mzikherman/Artsy/source/gravity/tiles/9
/Users/mzikherman/Artsy/source/gravity/tiles/8
/Users/mzikherman/Artsy/source/gravity/tiles/7
/Users/mzikherman/Artsy/source/gravity/tiles/6
/Users/mzikherman/Artsy/source/gravity/tiles/5
/Users/mzikherman/Artsy/source/gravity/tiles/4
/Users/mzikherman/Artsy/source/gravity/tiles/3
/Users/mzikherman/Artsy/source/gravity/tiles/2
/Users/mzikherman/Artsy/source/gravity/tiles/1
/Users/mzikherman/Artsy/source/gravity/tiles/0

fog gem required but not installed

Its quite possible I have a borked system, but every time I tried to run dzt, I got errors, such as

Brians-Mac-mini:~ brian$ dzt
/Users/brian/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- fog (LoadError)
    from /Users/brian/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/brian/.rvm/gems/ruby-2.1.1/gems/dzt-0.2.1/bin/dzt:4:in `<top (required)>'
    from /Users/brian/.rvm/gems/ruby-2.1.1/bin/dzt:23:in `load'
    from /Users/brian/.rvm/gems/ruby-2.1.1/bin/dzt:23:in `<main>'
    from /Users/brian/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
    from /Users/brian/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'
Brians-Mac-mini:~ brian$ subl /Users/brian/.rvm/gems/ruby-2.1.1/gems/dzt-0.2.1/bin/dzt

After trying a bunch of stuff, and going in circles, I tried gem install fog, and then the dzt command worked. Is it possible its not setup correctly in the gem dependencies? Is this a rvm issue?

Anyway, it seems to be working now, but thought I would mention it in case it helped anyone else.

Quality setting is ignored

I created one tile set with default settings where quality should be 75 and one where I set it to 90. My source image was a jpg with a setting of 90.
Both sets came out with a setting of 90.

For me it is no issue since it is what I want anyway. Changes in jpg quality affect image sharpness on the last zoom level substantially so the current behaviour (keeping the source quality) is actually preferred to resampling with a different quality (this should not be done unless the source is at 100 quality).

Thank you for making this available it seems like a great tool and I will use it in production.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.