How to load 12 bit image into System.Drawing.Bitmap?

∥☆過路亽.° 提交于 2019-12-24 12:26:25

问题


I have a server serving 12bit image and I can access the image through http, but since it is 12 bit image I am not able to load into System.Drawing.Bitmap(Stream stream).

Image format PNG bit depth 12

Image is here original 12 bit one

This is how the image should look once you are able to Load.


回答1:


You may be able to read the image when using OpenCV library, since it also supports 12bit. You may also prefer to look for an adapter/wrapper, in order to use it in c#, since it is originally a C++ library

also look at those posts:

OpenCV: Working with 12bit gray scale raw data

What is the BMP format for Gray scale Images?

Convert 12-bit Bayer image to 8-bit RGB using OpenCV

hope it helps



来源:https://stackoverflow.com/questions/15913605/how-to-load-12-bit-image-into-system-drawing-bitmap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!