Closed dk-teknologisk-mlnn closed 7 years ago
it is working now with "state". It was "autoconvert" that switched it back to 8bit.
Indeed, by default it converts to the smallest color model possible, but this can be disabled with the state, thank you for figuring it out :)
Hi,
I cannot get it to work with saving a 16 bit RGB image. I end up with 8 bit RGB. Upon decoding the file again it gives me state.raw_info.bitdepth == 8 . I tried with : lodepng::encode(pstr, VImage, m_x, m_y, LCT_RGB, 16U); and also using state: lodepng::State state; state.info_raw.bitdepth = 16U; state.info_raw.colortype = LCT_RGB; state.encoder.auto_convert = 1; state.info_png.color.bitdepth = 16; state.info_png.color.colortype = LCT_RGB;