Giter VIP home page Giter VIP logo

deepzoom.py's People

Contributors

ali1234 avatar gasi avatar kaens 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  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

deepzoom.py's Issues

ValueError: image has wrong mode

When I try to generate a DZI from the file available at https://www.sendspace.com/file/yskm3h, I get the exception ValueError: image has wrong mode:

from deepzoom import ImageCreator
creator = ImageCreator()
source = "/path/to/image"
destination = "/path/to/dzi"
creator.create(source=source, destination=destination)

Here's the traceback:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-5-9003b8af8c39> in <module>
----> 1 creator.create(source=input, destination=output)

~/path/to/virtualenv/src/deepzoomtools/deepzoom/__init__.py in create(self, source, destination)
    424         for level in range(self.descriptor.num_levels):
    425             level_dir = _get_or_create_path(os.path.join(image_files, str(level)))
--> 426             level_image = self.get_image(level)
    427             for (column, row) in self.tiles(level):
    428                 bounds = self.descriptor.get_tile_bounds(level, column, row)

~/path/to/virtualenv/src/deepzoomtools/deepzoom/__init__.py in get_image(self, level)
    399             return self.image
    400         if (self.resize_filter is None) or (self.resize_filter not in RESIZE_FILTERS):
--> 401             return self.image.resize((width, height), PIL.Image.ANTIALIAS)
    402         return self.image.resize((width, height), RESIZE_FILTERS[self.resize_filter])
    403

~/path/to/virtualenv/lib/python3.9/site-packages/PIL/Image.py in resize(self, size, resample, box, reducing_gap)
   1927                 )
   1928
-> 1929         return self._new(self.im.resize(size, resample, box))
   1930
   1931     def reduce(self, factor, box=None):

ValueError: image has wrong mode

Do you have an idea why this happening?

works great.. how about a progress meter??

this script works awesome! It would be nice though if it spit out some sort of progress meter to the command line. Anything would be fine. just something to tell you it isn't hung up. sometimes it runs for up to 4 hours on my machine. would be cool if it just said like
tile 01 of 450 complete
tile 02 of 450 complete
and so on.

or even just a 1% done would be great.

otherwise, I really like this script and it works fine!

thanks,
C

Idea: tile post process hook

An optional function that gets called after each tile gets created (but before it gets saved), so you can run whatever filter you want on it. Should be given the tile, level, and location.

a bit outdated

I had to install Pillow as pil is no longer availabe, also openzoom.org is down.

issues with python 3

Hi,
is it possible to install and run deepzoom.py with python 3? I get some errors, for example that there is no module StringIO and that xrange is not defined.
Trying to run it with Python 2.7; I also get errors. I used the module some years ago and it worked (so I'll try to use an older release as a workaround in the meanwhile)

Idea: "sharpen" option

An optional parameter for how much sharpening to add to each tile after it's been created.

Wrong text in generated XML (typo)

Using the latest version obtained in git today I have used the XML generated with Salado Player to display panoramic spherical images. The XML contains a typographic error that causes Salado Player to not find the images. Where it should be writen "xmnls" it is writen "xmlns" to point to the schema at the microsoft site.

Single tiling from multiple images

I've got ~6000 images at 1000x1000 pixels. I'm first making a large montage of 6Gpixels and then apply deepzoom.py. Everything works great but I'm wondering whether it's possible at all to omit the step of making the big montage and make a single tiling from individual images?

Bug in the tile saving in ImageCreator.create

Code in ImageCreator.create (lines 213-216):
if self.descriptor.tile_format == "jpg":
tile.save(tile_file, "JPEG",
quality=int(self.image_quality * 100))
tile.save(tile_file)
saves JPEG image twice, causing unpredictable hangups of Seadragon AJAX in Firefox 3.6. Furthermore, size of DeepZoom folders almost doubles.

Code below fixes the case:
if self.descriptor.tile_format == "jpg":
tile.save(tile_file, "JPEG",
quality=int(self.image_quality * 100))
else:
tile.save(tile_file)

Pypi

Any chance this project could be put on pypi?

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.