コード例 #1
0
ファイル: JpegLSCodec.cs プロジェクト: guybonneau/charls
        private static void JpegLsReadHeaderThrowWhenError(byte[] source, int length, out JlsParameters info)
        {
            var result = Environment.Is64BitProcess ?
                         SafeNativeMethods.JpegLsReadHeader64(source, length, out info, IntPtr.Zero) :
                         SafeNativeMethods.JpegLsReadHeader(source, length, out info, IntPtr.Zero);

            HandleResult(result);
        }
コード例 #2
0
        private static void JpegLsReadHeaderThrowWhenError(byte[] source, int length, out JlsParameters info)
        {
            Contract.Requires(source != null);

            var         errorMessage = new StringBuilder(256);
            JpegLSError result       = Is64BitProcess ?
                                       SafeNativeMethods.JpegLsReadHeader64(source, length, out info, errorMessage) :
                                       SafeNativeMethods.JpegLsReadHeader(source, length, out info, errorMessage);

            HandleResult(result, errorMessage);
        }