Repository navigation
i.his.rgb: reimplement conversion code - #5730
jayneel-shah18 wants to merge 2 commits into
Conversation
|
I realized that there are also tools r.his and d.his, could you check how different is that implementation? |
|
Thank you for the suggestion. I reviewed the implementations of
This patch complements |
This comment has been minimized.
This comment has been minimized.
echoix
left a comment
There was a problem hiding this comment.
Is it possible to code the expectations as unit tests?
This pull request fixes incorrect RGB outputs in
i.his.rgbGRASS module for certain combinations of hue, intensity, and saturation values, particularly:The prior implementation failed to correctly compute RGB for these edge cases due to formula limitations, incorrect assumptions, and redundancy in the
his2rgb.clogic.This patch:
rowbufferoverwrite style used inmain.cFile Changed
his2rgb.c— fixed all cases via modularhue2rgb()logic and improved edge-case handling.Validation Table (Old vs. Reference RGB Values)
Fixes #5659
Please review and suggest further improvements if necessary.