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 an optional kwarg to CloudCompositor for RGBA output #2788
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2788 +/- ##
=======================================
Coverage 95.94% 95.94%
=======================================
Files 379 379
Lines 53693 53713 +20
=======================================
+ Hits 51515 51535 +20
Misses 2178 2178
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 8785324481Details
💛 - Coveralls |
Could you explain more why/when this is needed? Normally writers or other compositors are supposed to handle these cases for you. |
My fault. Didn't realize that. Closing now |
If you have a use case where this isn't true let me know. There is very likely a case where things won't work, I just didn't know what that situation would be. |
Well some image viewing software can't display LA images correctly, such as Photo Viewer in Windows. That's why I start this. But your words remind me that I can build something with
But there are still some errors I'm trying to figure out. |
So
The logic is: lay a completely transparent RGBA image upon the LA image(day cloud) then you get the RGBA result because |
Why is C14 being used here? Is the final result you want just a geotiff with the cloud compositor output as RGBA? And you need that so more image viewers will show the image correctly? |
Yes I want a geotiff in RGBA mode so that my image viewer can show it properly. C14 is used just for convenience since cloudcompositor will also use that band. Actually it can be any bands since all I need from that is just a transparent image . I'm not sure if other image viewers have such problems but in my Windows pc that is certain. Could just be a rare case, who knows... |
I think this is a good feature, but should maybe not be added to just the CloudCompositor. I wonder if there is a way to do this with enhancements. @pnuu @simonrp84 or @mraspaud any ideas how to take the output of a composite that is LA and produce an RGBA without modifying Satpy or trollimage? |
The first option that comes to mind is to create a composite that has C14 on all 3 channels and then use that with |
@pnuu Unfortunately
|
Usually
CloudCompositor
produces an LA mode image. But sometimes you may want RGBA result. So this PR will add "mode" kwarg just likeMaskingCompositor
.