-
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
add page argument to thumbnail #192
Comments
I understand this probably isn't a small change as it would require the thumbnail reader / writer to understand tiffload. For instance, this image. |
Hi @petoor, You're supposed to do something like:
The "no SUBIFD tag" error looks like a bug in libvips master, I'll have a look. |
the recent subifd addition had broken thumbnail of multipage tiffs, thanks @petoor see libvips/pyvips#192
Yes, the recent addition of bioformats subifd pyramid support had broken multipage tiff thumbnailing. It should work now. Thanks for reporting this! |
I just tested your fix to libvips, and the subifd tag error is gone. However, and you can test with the 2channels_flat image, setting the page argument in thumbnail doesnt seem to actually load the page.
Which should be False |
Sorry, the numpy logic is wrong in that comment. The code should be
|
You're right, many-page TIFF thumbnailing is not working, I'll have another look. |
The addition of subifd handling broke multipage tiff thumbnailing. See libvips/pyvips#192
I think it's fixed. I'll add some more tests. |
If it is pushed to libvips master i can test as well. |
Yes, it's pushed, and I added some more tests too. |
It seems to work great. |
Great! Thank you for testing it, I'll close. |
If the vips-loader is openslideload it doesn't accept the page argument, however if this is by design or not i'm not sure. Iit seems like the other loaders just ignore it if page doesn't make sense for them |
You must only supply the accepted arguments for all loaders. For example:
|
Hi John.
Following #190
I was wondering if it was possible to add a page argument to image.thumbnail ?
Right now the solution is to use new_from_file(..., page=page) and then use img.thumbnail_image, but as you stated it is not the optimal solution.
Best regards
The text was updated successfully, but these errors were encountered: