-
Notifications
You must be signed in to change notification settings - Fork 43
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
Non-transparent outside bounds with getTile for tifs without style #1186
Comments
Why is this an issue? It has significant impacts when using the new viewer in #1065: Screen.Recording.2023-05-30.at.1.22.33.PM.mov |
Does adding Some viewers automatically crop to the maximum extent of the tiles; other viewers expect short tiles at the right and bottom edges (add |
Do you mean |
Turns out the issue is specific to greyscale images loaded without a style. If the images is greyscale, then the edge color remapped to the grayscale space. You have to apply a style to get out of the greyscale space: import large_image
path = 'HTA9_1_BA_F_ROI02.ome.tif'
source = large_image.open(
path,
encoding="PNG",
edge="#0F02",
)
source.getTile(1, 1, 1) source = large_image.open(
path,
encoding="PNG",
edge="#0F02",
style = {"bands": [
{"band": 1, "palette": ["#000", "#fff"]}
]}
)
source.getTile(1, 1, 1) This is not a high priority |
I noticed that TIF files with the
TiffFileTileSource
andOMETiffFileTileSource
sources (at least), if the image is opened without a style, the areas outside the bounds of the image forgetTile()
are black/opaque but the encoding is PNG and these areas should be transparentOr with an OME file:
However, with the OME source, if I open with a style, the region becomes transparent:
The text was updated successfully, but these errors were encountered: