Closed emmanuelle closed 3 years ago
Also it could be a good idea to let thumbnail_size be a tuple instead of an integer.
I'm not sure if Pillow allows this. Pillow seems to consider the given size as a hint. Which is why we have get_thumbnail_size()
. But we can try.
Another nice addition would be to select a better default size when the data is very anisotropic. I noticed too that with the xray app the low-res data is way too low-res :P
BTW: I suspect that we're using different versions of Black (CI runs the latest).
Ready for review. I tested this on the xray app of the gallery. Probably I should add more tests and an example :-).
This is nice!
Thanks for the review @almarklein !
This PR looks good to go. Do you know what's up with the circleci build, @emmanuelle ?
[Updated]
This PR introduces a
thumbnail_size
property of the slicer, in order to be able to choose the size of the low-resolution images uploaded and available clientside. It is an integer, or None, in which case the full resolution data is uploaded clientside (I implemented this by not attaching the server callback, which was an easy solution).