GreycLab / CImg

The CImg Library is a small and open-source C++ toolkit for image processing
http://cimg.eu
Other
1.48k stars 282 forks source link

save_png size issue #312

Open Anw7 opened 3 years ago

Anw7 commented 3 years ago

Hi, Just tried using lib for first time, doc is appealing but using it doesn't seem to work :

When I create image and save it, on X11, size is wrong and grayscale is picked by default.

_const CImg img{100,100,1, 4}; img.savepng(filename,4);

If I verify in file properties, the size shrinks to 4x1 (slightly different if I alter the parameters of CImg constructor, but always an arbitrary size)

Anw7 commented 3 years ago

/tmp/abc.png: PNG image data, 4 x 1, 8-bit grayscale, non-interlaced