-
Notifications
You must be signed in to change notification settings - Fork 102
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
Set the color to grey if one channel. #3140
Conversation
I'm not convinced of this being reasonable behaviour. If an image has a channel colour and a single channel, that channel colour should be used. Isn't the problem here the assignment of red as the channel colour in the absence of a channel colour? In the latter case defaulting to grey is reasonable, but for the former this is completely counter to expectations (and other software). |
@rleigh-dundee: if the color is already set, we use it. We only default to grey if no color set. see commit |
Integer alpha = getValue(channel.getAlpha()); | ||
RString name; | ||
//color already set by Bio-formats | ||
if (red != null && green != null && blue != null && alpha != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that if Bio-Formats set RGB then it would have also set α.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mtbc: it will yes
Works well, good to merge. |
Merging |
Set the color to grey if one channel.
--no-rebase |
To test this PR
before
after