Closed midoragh closed 8 months ago
Thanks for the information. I've been aware of the existence of 64-bit BMP extensions, but not sure how standard they are, or if anyone uses them in files.
I think I do want to add some 64-bit files to bmpsuite, but it might not happen soon, and I don't know what issues I might run into. If you can point me to some example files, it might help.
The attached bmp has been created using the following code
var rgb24Bitmap = new Bitmap(@"C:\Users\ZZZ\Downloads\bmpsuite-2.7\g\rgb24.bmp");
var argb64Bitmap = new Bitmap(rgb24Bitmap.Width, rgb24Bitmap.Height, PixelFormat.Format64bppArgb);
using (var gr = Graphics.FromImage(argb64Bitmap))
{
gr.DrawImage(rgb24Bitmap, new Rectangle(0, 0, rgb24Bitmap.Width, rgb24Bitmap.Height));
}
argb64Bitmap.Save(@"C:\Users\ZZZ\Downloads\bmpsuite-2.7\g\argb64.bmp", ImageFormat.Bmp);
In the FileExplorer rgb24.bmp and argb64.bmp are looking the same. But if I'm doing the mapping of the values in the range 0.0..1.0 to 0..255 manually and save it as rgb 24 then the image is darker. So 64bit may not be in sRGB (or I'm doing something wrong).
Can be closed?
Closing. Issue #21 might stay open until I decide what do do about transparency.
There is just a little bit information about this format (https://docs.microsoft.com/en-us/windows/win32/wic/-wic-codec-native-pixel-formats) but I'm able to create a 64-bit BMP file in c# by creating 64-bit bgra Bitmap, draw a 32-bit bgra Bitmap on it and save it as bmp. The resulting file uses a BITMAPINFOHEADER with a bitcount of 64. The pixels are a bit special. All 16-bit channel values are fixed point values in the format s2.13: (sign bit, two integer bits, and thirteen fractional bits). These files seem to work with any application using WIC (like the FileExplorer, Photo, paint.net). Would it make sense to add such files to the bmpsuite?