We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I'm trying to get a thumbnail from "CMU-1.ndpi"(https://data.cytomine.coop/open/openslide/hamamatsu-ndpi/CMU-1.ndpi). But it takes more than 10 seconds. Is there any other way to get a thumbnail image faster?
import pyvips import timeit def run(): slide = pyvips.Image.new_from_file("CMU-1.ndpi") thumb = slide.thumbnail_image(500) thumb.write_to_file("tn_CMU-1.png") timeit.timeit(lambda :run(), number=10)
vipsthumbnail CMU-1.ndpi
The text was updated successfully, but these errors were encountered:
Hello @tand826,
Don't use thumbnail_image. Because the image has already been opened, it can't do any of the shrink-on-load tricks that help make thumbnail fast.
thumbnail_image
Try:
import pyvips import timeit def run(): slide = pyvips.Image.thumbnail("CMU-1.ndpi", 500) thumb.write_to_file("tn_CMU-1.png") timeit.timeit(lambda :run(), number=10)
I would also consider updating to current libvips, 8.9.1. There have been some useful fixes.
Sorry, something went wrong.
@jcupitt Thank you! It works super fast!
No branches or pull requests
Hi, I'm trying to get a thumbnail from "CMU-1.ndpi"(https://data.cytomine.coop/open/openslide/hamamatsu-ndpi/CMU-1.ndpi). But it takes more than 10 seconds. Is there any other way to get a thumbnail image faster?
Sample Code
Tried
vipsthumbnail CMU-1.ndpi
finishes within a second, but I want to implement without subprocess.call()Environment
The text was updated successfully, but these errors were encountered: