PixelFormat.Format32bppArgb seems to have wrong byte order

前端 未结 3 1035
天命终不由人
天命终不由人 2020-12-14 07:17

I try to get all byte values from a Bitmap(System.Drawing.Bitmap). Therefore I lock the bytes and copy them:

public static byte[] GetPixels(Bitmap bitmap){
          


        
3条回答
  •  臣服心动
    2020-12-14 07:49

    AFAIK it is technically based on COLORREF (which is used in Windows GDI/GDI+ everywhere) and that is stored RGBA in memory... see http://msdn.microsoft.com/en-us/library/dd183449%28VS.85%29.aspx

提交回复
热议问题