Closed johandweber closed 2 months ago
Hello,
I've noticed a small mistake. Why do you use ishft
if ibits
already does that and provides the correct RGB values?
shouldn't it be something like this?
color%a = ibits(rgb_int,24, 8)
color%b = ibits(rgb_int,16,8)
color%g = ibits(rgb_int,8, 8)
color%r = ibits(rgb_int,0,8)
Thanks! I have not known that ibits already returns right-adjusted values. I have now corrected rgb.f90 accordingly.
Okay, everything looks good to me. Thank you for the PR.
Hallo,
i have added a method int_to_RGB that is able to convert the integers used for the canvas to RBG values to rgb.f90. Additionally, I have added a test program for int_to_RBG and RGB_to_int.
This is mainly preparative work for reading ppm files.