uroshrs
February 8th, 2006, 07:31 AM
Hi everyono, I am using CImg library, and have a problem. I constructed 48*32 grayscale imag with:
CImg<double> image(48,32,1,1,0);
After that if, for instance i want to put some pixel to values 126, i use:
for(int i=0;i<48;i++){
for(int j=0;j<3;j++){
image(i,j)=126;}}
and than try to display that by:
CImgDisplay display(image);
All i get is black and white image, and i want to get a grayscale image, Can somebody tell what am i doing wrong.
Thanks in advance
Uros
CImg<double> image(48,32,1,1,0);
After that if, for instance i want to put some pixel to values 126, i use:
for(int i=0;i<48;i++){
for(int j=0;j<3;j++){
image(i,j)=126;}}
and than try to display that by:
CImgDisplay display(image);
All i get is black and white image, and i want to get a grayscale image, Can somebody tell what am i doing wrong.
Thanks in advance
Uros