Wed 06 Dec 2017 11:05:12 PM UTC, comment #5:
Yeah this could be a case of a change in gnuplot. I'm using the development version 5.3.0.
There is this other bug report from a month or so ago:
https://savannah.gnu.org/bugs/?52401
at which point I looked into what was going on with gnuplot. gnuplot made a change without too much discussion about syntax. Typically gnuplot is very conservative about changing syntax. Rather than autoscaling to determine range, gnuplot now has this "rgbmax" variable:
If anything, I wish the syntax change would have been "set rgbrange [0:255]" which would have been fully consistent with other range settings in gnuplot.
Nonetheless, gnuplot now has 0 to 255 as the default range and that is probably why this comes up now.
The good thing is that I just went back to the example of https://savannah.gnu.org/bugs/?52401 and changing the color map size to 256
appears to correct the image darkness. So, I'd say if the changeset has no affect on your result with gnuplot 5.0.3 (because that is using autoscaling), then it would be a good fix for the issue without using gnuplot's new "rgbmax" syntax. We could then close this bug report and https://savannah.gnu.org/bugs/?52401
|
Wed 06 Dec 2017 08:28:44 PM UTC, comment #1:
Try the attached patch.
The image you are seeing is range 0-63 for 8-bit image, which naturally comes out darker. I can't recall why I would have scaled the true-color data to the range of the color map for Truecolor data. gnuplot does have a means of generating images through a color map (and I'm sure that's what was on my mind at the time), but that's not pertinent to 3-component data. In any case, I don't see any adverse effects in "rundemos draw" with the attached patch.
(file #42585)
|
Wed 06 Dec 2017 01:42:45 PM UTC, original submission:
After applying the patch for bug #52589 (have not tried without the patch) gnuplot shows a shaded image when using imshow on a png image containing only primary saturated colours.
THe following works well with the attached file
If you try using gnuplot rather than fltk, you see a shaded image.
By the way, note that I force the output of imread to double because of bug #49140.
|