John Cupitt
John Cupitt
I'd guess you have several libvipses installed and it's picking up the wrong one. Try: ```python import logging logging.basicConfig(level=logging.DEBUG) import pyvips ``` And you'll see some diagnostics. ojg mailing list:...
Those are big patches! How many slide images will you be working from?
650 isn't so many. I would open them all (ie. make 650 pipelines) and then use fetch to pull out tiles. You could try using crop as well, but fetch...
Try `--vips-progress`, it gives some more info about computation: ``` $ time vips avg CMU-2.svs --vips-progress vips temp-1: 78000 x 30462 pixels, 8 threads, 128 x 128 tiles, 256 lines...
It's pretty easy, just build the pipeline, then use `vips_region_fetch()` to pull pixels out of it: https://libvips.github.io/libvips/API/current/VipsRegion.html#vips-region-fetch
It's part of the standard API from libvips 8.8, I think. Perhaps you have an old version installed?
You'll need to update -- your libvips is five years old.
Hi @wenqf11, `fetch` is quick for small tiles and random reads, especially if you have several pipelines you want to run at once (the example above generates the 8 rotates...
Hi @InfinityBox, I would guess your TIFF has been truncated, and libtiff is failing to decompress the final few strips. Could you share the image file?
Hi @abubelinha, The main docs are here: https://www.libvips.org/API/current/VipsForeignSave.html#vips-tiffsave You need eg.: ```python image.tiffsave("x.tif", compression="jpeg", Q=50, tile=True, tile_width=256, tile_height=256, pyramid=True) ``` The big saving would be to enable sequential mode, so...