Hi, I think the code here:
" image->SetSize(width, height);
png_bytep* row_pointers = new png_bytep[height];
for (u32 y = 0; y < height; ++ y) {
row_pointers[y] = reinterpret_cast<png_bytep>(image->row(y));
}
png_read_image(png_ptr, row_pointers);
"
will convert 16-bit RGB image into 8-bit RGB right?
The libpng api: void PNGAPI
png_read_image(png_structrp png_ptr, png_bytepp image) require png_bytepp( uchar pointer pointer).
Is there any easy way to change the above code so that it supports 16-bit RGB image as input?