Comments (15)
Hello, you can't write SVS, it's a read-only format.
Do you want a command-line? Try:
vips black x.tif 500000 100000
It'll obviously take a while!
from pyvips.
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.
from pyvips.
Oh, sorry, pyvips. Try:
import pyvips
huge_image = pyvips.Image.black(500000, 100000)
huge_image.write_to_file("x.tif")
from pyvips.
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.
from pyvips.
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:
huge_image.tiffsave("x.tif", tile=true, compression=jpeg, bigtiff=true)
from pyvips.
I got this error:
I used numpy to vips conversion and wrote it into pyimg. sourcenorm is an numpy array for a color image. Here s is a string containing path for saving the .tif extension file.
pyimg = numpy2vips(sourcenorm)
pyimg.tiffsave(s, tile=True, compression='jpeg', bigtiff=True)
File "/home/deepakanand/.local/lib/python2.7/site-packages/pyvips/vimage.py", line 799, in call_function
return pyvips.Operation.call(name, self, *args, **kwargs)
File "/home/deepakanand/.local/lib/python2.7/site-packages/pyvips/voperation.py", line 132, in call
op = Operation.new_from_name(operation_name)
File "/home/deepakanand/.local/lib/python2.7/site-packages/pyvips/voperation.py", line 60, in new_from_name
raise Error('no such operation {0}'.format(operation_name))
pyvips.error.Error: no such operation tiffsave
VipsOperation: class "tiffsave" not found
from pyvips.
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.
from pyvips.
Thanks for such response.
Can you provide me a stepwise instruction for rebuilding it. I was not able to build it as one go. There were errors. However, later it started to work.
I am running Ubuntu 16.04, python 2.7.
from pyvips.
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.
from pyvips.
If libvips is already there then how to add support for Tiffsave.
from pyvips.
Because you have installed your own libvips which does not have tiff support. Remove it and install the Ubuntu one instead.
from pyvips.
Cool! I will do it and get back to you. Thanks again. You are one of the most active guys in handling issues.
from pyvips.
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?
from pyvips.
Openslide recognizes the file if it has multiple layers. Thanks a lot.
from pyvips.
Ah OK, good to know. That's with pyramid=True
I guess?
from pyvips.
Related Issues (20)
- Select interpretation when initializing the image HOT 1
- VipsOperation: class "pdfload" not found HOT 2
- SVG rendering failed HOT 1
- JPEG compression resulted in color error. HOT 1
- How to generate patches from coordinate list by a multiprocessing way? HOT 1
- Dtype auto conversion while running script HOT 6
- new release when & ship with libvips? HOT 14
- ICC Profile Application on SVS and tiffsave hangs randomly
- High RAM usage with fetch when reading multiple WSI tiles HOT 2
- Slower first run, even without cache HOT 2
- using resource.setrlimit makes pyvips / liborc spit the dummy HOT 2
- Memory leaking with pdf HOT 21
- dzsave_target returns NoneType not list[] as in docs HOT 1
- Pyvips fetch returns bad image on .svs files HOT 4
- Reading in image a second time breaks on qptiff file HOT 6
- Documentation link to conda package HOT 1
- Create svs file with image pyramid, label and macro in pyvips? HOT 4
- Image merge stitch HOT 2
- `addalpha` has different behaviour compared to C HOT 1
- Error installing pyvips on Mac OS HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvips.