public void GetImageInfo(byte[] data, ref int nComponents, ref nvjpegChromaSubsampling subsampling, int[] widths, int[] heights) { res = NvJpegNativeMethods.nvjpegGetImageInfo(_handle, data, data.Length, ref nComponents, ref subsampling, widths, heights); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nvjpegGetImageInfo", res)); if (res != nvjpegStatus.Success) { throw new NvJpegException(res); } }