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

Way to enforce --tile-width and --tile-height ? #32

Closed
fuho opened this issue Oct 5, 2012 · 19 comments
Closed

Way to enforce --tile-width and --tile-height ? #32

fuho opened this issue Oct 5, 2012 · 19 comments
Labels

Comments

@fuho
Copy link

fuho commented Oct 5, 2012

question

Can I force vips dzoom to always generate tiles of specified --tile-width and --tile-height?
The edge tiles inevitably end up narrower or shorter in different zoom levels.0

Unless the solution is using google maps export in 7.31, will look into that.

@jcupitt
Copy link
Member

jcupitt commented Oct 5, 2012

DeepZoom always has tiny edge tiles, you have to have it that way or the viewers won't work.

You're right, the google maps option turns on a thing to round edge tiles up to full-size. It has a different system for numbering tiles though.

@jcupitt jcupitt closed this as completed Oct 5, 2012
@fuho
Copy link
Author

fuho commented Oct 5, 2012

I am trying to use Leaflet [ http://leaflet.cloudmade.com/ ] which is originally designed for maps so it might be better choice for me altogether even though I was to use it to display eslides from microscope. I will try to compile from Git clone (even though in Git it seems to still be on 7.30) and have a look at the different file numbering system then. Again thanks for such a speedy response I wish more people were like you :)

@jcupitt
Copy link
Member

jcupitt commented Oct 5, 2012

I'm supposed to be writing, so any distraction is welcome :-(

I did a test microscope slide using zoomify:

http://www.rollthepotato.net/~john/zoomify/1-Defaults.htm

It seems to work, though leaflet looks nicer.

@fuho
Copy link
Author

fuho commented Oct 5, 2012

Yep, that is something I am trying to achieve. I wanted to use Zoomify or OpenSeadragon first, but then found Leaflet and almost fell in love with it. All the plugins, it works on mobile, supports multitouch on phones and tablets, can implement drawing on the slides, even 3d objects.

Well anyways,
I have compiled the git version (thanks to your help yesterday), and it seems to work fine even though it is printing ** DEBUG_FATAL every time.
But I can't find the GoogleMap class or package, neither deep zoom, is there some documentation I am not reading?
What are you writing? A book?

@jcupitt
Copy link
Member

jcupitt commented Oct 5, 2012

Hi, configure with --disable-debug to stop the FATAL messages. Odd-numbered releases (eg. 31) default to all debugging enabled.

Use dzsave with --layout to make google maps format:

$ vips dzsave fred.jpg x --layout google

or --layout zoomify to make that format. I've not tested the google maps writer, I just tried to implement the spec I found somewhere. Let me know if it's broken.

Just writing part of a paper, very boring.

@fuho
Copy link
Author

fuho commented Oct 8, 2012

Finaly had time to try it again. I works great. I generates white background where it needs to. Is there a way to change the colour or perhaps set the transparency in case of PNG?

@jcupitt
Copy link
Member

jcupitt commented Oct 8, 2012

No, it's white only. I'll look at adding an option.

@jcupitt
Copy link
Member

jcupitt commented Oct 10, 2012

Would picking black or white be enough? Or do you need to be able to set specific colours?

@jcupitt
Copy link
Member

jcupitt commented Oct 10, 2012

I added a thing to let you specify any colour:

jcupitt@2f65b07

eg.

vips dzsave k2.jpg x --layout google --background "1 2 3"

For PNG, set transparency by giving four numbers, RGBA. Numbers are decimal.

@fuho
Copy link
Author

fuho commented Oct 10, 2012

Awesome! Thanks! Pulling and recompiling now, will report soon.

@fuho
Copy link
Author

fuho commented Oct 10, 2012

Well.. I don't know what I did but vips doesn't run now.
I rm -Red ~/libs/vips and then configured with prefix, made and installed but now I am getting:

$ vips --version
vips: error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory

I checked libtiff and libtiff-dev but both are there:

$ sudo apt-get install libtiff4 libtiff4-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libtiff4 is already the newest version.
libtiff4-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I will try, if I dcan figure out why, to check out older commit and compile that and see if that works.

@fuho
Copy link
Author

fuho commented Oct 10, 2012

Ok, I checked out dee1aac and compiled and have the same issue, so far have no clue what happened :( Will report any new findings.

@jcupitt
Copy link
Member

jcupitt commented Oct 11, 2012

I think you may have deleted the old vips incorrectly. Probably it should have been rm -rf ~/vips?

Nuke from orbit and try again:

rm -rf ~/vips
./configure --prefix=/home/fuho/vips
make
make install

and check that PATH and LD_LIBRARY_PATH contain "/home/fuho/vips/bin" and "/home/fuho/vips/lib" respectively.

@fuho
Copy link
Author

fuho commented Oct 11, 2012

Since I am having issues with cleaning after my installs I created a virtual pc running Ubuntu 12.04 Server edition and made a snapshot right before firts login after finished installation. After each unsuccessful install I revert to that snapshot and run the script like this again.

curl -L http://goo.gl/vsvh5 | sudo bash

This is where I am testing a script I wrote which should install libvips with support for openslide from github repos. You can see the script in a gist here https://gist.github.com/3870223, but I still don't have luck getting it to work.
I keep getting:

vips: error while loading shared libraries: libvips.so.29: cannot open share object file: No such file or directory

I am installing it as sudoed user without --prefix. I spent over 17 hours on it today to no avail, will continue tomorrow.
Maybe I am making some obvious mistakes, please look at the gist and let me know if you see something.

@jcupitt
Copy link
Member

jcupitt commented Oct 12, 2012

Oh dear, you must be making some small mistake, this should be very easy.

It sounds like it can't find the libvips library. Check the file is there and readable, then check what areas your system is searching. "ldd" is handy for seeing what libraries are being loaded. Try:

ldd `which vips`

to see what libs vips is looking for. Check that it's finding the ones it should from /usr/local/lib.

I would avoid building directly from git master. People try to keep it working, but it's not always 100%. I would pick a known-good point in the repository and make a tarball. Build from that and you'll be safe from anyone upstream making an error.

I would also build to a place in my home directory, if possible. Is there a strong reason to build to /usr/local?

@fuho
Copy link
Author

fuho commented Oct 12, 2012

The reason behind building this as a root without prefix is that eventually I will be installing this on servers and would like all users to be able to use it.
I am installing from git repo because I need deepzoom and google maps export. I also need support for the latest openslide that's why I am compiling openslide just before, also from github.
I can add checkouts of known commit before i attempt to configure and see if it helps. My whole life I have avoided learning C hoping it will just go away one day, but every so often it bites me in the ass :) I guess at least scratching the surface will be unavoidable, or learning how exactly gcc, configure and make works.
I will run the script on a vanilla virtual pc and try ldd as you mentioned.

@fuho
Copy link
Author

fuho commented Oct 13, 2012

linux-vdso.so.1 =>  (0x00007fffbdfd0000)
libvips.so.29 => not found
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fa326701000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fa32640b000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa3261ee000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa325e2f000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fa325c26000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fa3259e9000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fa3257e1000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa32695b000)

This is the output of ldd which vips``

@fuho
Copy link
Author

fuho commented Oct 14, 2012

Looks like

sudo ldconfig

fixed that :)

@lukluk
Copy link

lukluk commented Apr 17, 2017

thanks bro

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

No branches or pull requests

3 participants