-
Notifications
You must be signed in to change notification settings - Fork 50
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
Write a huge (500,000 X 100,000) as .svs or .tiff format #69
Comments
Hello, you can't write SVS, it's a read-only format. Do you want a command-line? Try:
It'll obviously take a while! |
Oh, sorry, pyvips. Try: import pyvips
huge_image = pyvips.Image.black(500000, 100000)
huge_image.write_to_file("x.tif") |
Thanks for the quick reply. I have a numpy array of size that big. I want to write it as to be read compatibly by openslide which leaves me with an option of only tiff images. |
You can go numpy -> vips like this: https://github.com/libvips/pyvips/blob/master/examples/pil-numpy-pyvips.py You probably saw. I would save as a tiled jpeg bigtiff, so:
|
I got this error:
|
Looks like your libvips has been built without tiff support. Did you make it yourself? Check the output of libvips configure and make sure you have the libtiff headers. |
Thanks for such response. |
There's a chapter in the docs: https://libvips.github.io/libvips/install.html#building-libvips-from-a-source-tarball it's like building any linux project. but are you sure you need to build libvips? The version that's included with Ubuntu 16.04 should work. |
If libvips is already there then how to add support for Tiffsave. |
Because you have installed your own libvips which does not have tiff support. Remove it and install the Ubuntu one instead. |
Cool! I will do it and get back to you. Thanks again. You are one of the most active guys in handling issues. |
I was able to write the image as .tif format but openslide fails to read it. Do I need to read the created files using vips only? |
Openslide recognizes the file if it has multiple layers. Thanks a lot. |
Ah OK, good to know. That's with |
Yes by doing pyramid=True. However is there any way to only restrict the number of layers alongwith pyramid? It gives 10 layers by default. |
I am new to pyvips. I am inable to find the syntax for writing these huge images in *.svs or *.tiff format. Please help.
The text was updated successfully, but these errors were encountered: