예제 #1
0
        public CImageBuffer testImageBuffer()
        {
            CImageBuffer[] bufs = new CImageBuffer[imgs.Count];
            for (int i= 0; i < imgs.Count; ++i)
            {
                bufs[i] = CImageConverter.CImageByteToBuffer(imgs[i]);
            }

            Debug.WriteLine(Marshal.SizeOf(bufs[0]).ToString());
            //setDebugLogFunc(DebugLog);

            unsafe
            {
                fixed (CImageBuffer* p = &bufs[0])
                {
                    int state = runImageMerge((IntPtr)p, imgs.Count, out ret);
                    Debug.WriteLine("ret: " + ret.ToString());
                }
            }
            return ret;
        }
예제 #2
0
 static public CImageByte CImageBufferToByte(CImageBuffer img)
 {
     byte[] bytes = new byte[img.Length];
     Marshal.Copy(img.Ptr, bytes, 0, (int)img.Length);
     return new CImageByte(bytes, img.Width, img.Channel);
 }
예제 #3
0
 public extern static int runImageMerge(IntPtr bufs, int len, out CImageBuffer ret);