Skip to content
Snippets Groups Projects
Commit 65e4d0c5 authored by David Tschumperlé's avatar David Tschumperlé
Browse files

Improve colormap used in CImg<T>::draw_graph().

parent b3e99320
No related branches found
No related tags found
No related merge requests found
...@@ -48542,11 +48542,11 @@ namespace cimg_library_suffixed { ...@@ -48542,11 +48542,11 @@ namespace cimg_library_suffixed {
if (_spectrum>6) { if (_spectrum>6) {
cimg::mutex(8); cimg::mutex(8);
const unsigned int seed = cimg::rand(); const unsigned int seed = cimg::rand();
cimg::srand(154362983); cimg::srand(10);
cimg_for_inY(colormap,6,colormap.height()-1,k) { cimg_for_inY(colormap,6,colormap.height()-1,k) {
colormap(0,k) = 120 + (unsigned char)cimg::rand(-100.f,100.f); colormap(0,k) = (unsigned char)(120 + cimg::rand(-100.f,100.f));
colormap(1,k) = 120 + (unsigned char)cimg::rand(-100.f,100.f); colormap(1,k) = (unsigned char)(120 + cimg::rand(-100.f,100.f));
colormap(2,k) = 120 + (unsigned char)cimg::rand(-100.f,100.f); colormap(2,k) = (unsigned char)(120 + cimg::rand(-100.f,100.f));
} }
cimg::srand(seed); cimg::srand(seed);
cimg::mutex(8,0); cimg::mutex(8,0);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment