Apologies in advance for what maybe a silly noob question. I am using the following java code to read and immediately write out a PNG file (attached):
byte[] buf = getBytesFromFile("./t2.png");
Mat mat = imdecode(new MatOfByte(buf), IMREAD_COLOR);
MatOfInt params = new MatOfInt(CV_IMWRITE_PNG_COMPRESSION, 0);
imwrite("./t3.png", mat, params);
The original file has 96 dpi, and the output file has 72 dpi. Why is that? I would like for the output file to have the same settings as the original. Thanks