Let say we want to stitch image from this website:
http://openlayers.org/en/master/examples/zoomify.html
After using:
py dezoomify.py http://openlayers.org/en/master/examples/zoomify.html pic.jpg
We get:
ERROR: Zoomify base directory not found […]
If that does not work, see “Troublesshooting” […]
But that is okay, because in our browser cache we can easily find the “base directory”:
http://vips.vtech.fr/cgi-bin/iipsrv.fcgi?zoomify=/mnt/MD1/AD00/plan_CHU-4HD-01/FOND.TIF/ImageProperties.xml
http://vips.vtech.fr/cgi-bin/iipsrv.fcgi?zoomify=/mnt/MD1/AD00/plan_CHU-4HD-01/FOND.TIF/TileGroup0/4-7-3.jpg
So now we use:
py dezoomify.py http://vips.vtech.fr/cgi-bin/iipsrv.fcgi?zoomify=/mnt/MD1/AD00/plan_CHU-4HD-01/FOND.TIF test.jpg –b
But this time we get:
ERROR: Could not open ImageProperties.xml
URL: http://vips.vtech.fr/cgi-bin/ImageProperties.xml
I hope you agree that this is a real problem :).
I forked the project on github and fixed this bug (and others): https://github.com/lovasoa/dezoomify-py
Thank you. But I got a strange error. After:
py dezoomify.py http://vips.vtech.fr/cgi-bin/iipsrv.fcgi?zoomify=/mnt/MD1/AD00/plan_CHU-4HD-01/FOND.TIF test.jpg –b
I got:
File "dezoomify.py", line 3
TAKE A URL CONTAINING A PAGE CONTAINING A ZOOMIFY OBJECT, A ZOOMIFY BASE
^
SyntaxError: invalid syntax
With other url is the same. I tested new dezoomify on Win XP with Python 3.4.4. and on Wind 7 with Python 3.5.1. Dezoomify 1.4 works fine.
Are you sure you are using my fork? The string "TAKE A URL CONTAINING A PAGE CONTAINING A ZOOMIFY OBJECT" is at line 5, not 3: https://github.com/lovasoa/dezoomify-py/blob/master/dezoomify.py#L5
Yes, I use a file "dezoomify-py-master.zip" from site:https://github.com/lovasoa/dezoomify-py . The beginning of the scripts in the new dezoomify.py and in the old version 1.4 are exactly the same. But only in the new version I get this error. This is very strange.
But dezoomify had another bug that prevented your image from being downloaded, that I just fixed. Here is your image: https://www.dropbox.com/s/4wgw8ercoa9v1d3/test.jpg?dl=0
Thank you but dezoomify still does not work on my Windows.
I am using the same test.bat file in old (1.4) dezoomify.py and in the new one. In the first case I get:
ERROR: Could not open ImageProperties.xml
URL: http://vips.vtech.fr/cgi-bin/ImageProperties.xml
In the second case:
File "dezoomify.py", line 3 (etc.)
My test.bat file is:
py dezoomify.py http://vips.vtech.fr/cgi-bin/iipsrv.fcgi?zoomify=/mnt/MD1/AD00/plan_CHU-4HD-01/FOND.TIF test.jpg -b
pause
It seems the problem is with UTF-8 (BOM). I opened old dezoomify.py (version 1.4) and pasted to it, content from the newest dezoomify.py . Thus created new file works fine.
There is no BOM in the file. Maybe there is a problem with line endings. I changed line endings, to UNIX-style.
Last edit: ooo 2016-04-17
I have found where is the problem. I opened both version of dezoomify.py in hex editor and here is the comparison. The old dezoomify.py:
[#]!/usr/bin/env python3 (0D 0A)
[#]coding=utf8 (0D 0A)
(0D 0A)
""" (0D 0A)
The new, not working version
[#]!/usr/bin/env python3 (0A)
[#]coding=utf8 (0A)
(0A)
""" (0A)
In windows new line is: 0D 0A.
Last edit: Jan 2016-04-17
Yes, you are right. Now the line ending is again "0D 0A", and all works fine. You did good job. Thank you for very useful piece of software :). Best regards,
PS. About line ending: https://en.wikipedia.org/wiki/Newline
Last edit: Jan 2016-04-17