I actually use the libpng to save png images.
To configure the library, I'm using the following line : png_set_IHDR(png, info, width, height, 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
What is the right argument to replace PNG_COLOR_TYPE_RGB to save a png image into grayscales ?
(color type 0)
Thanks !