Beispiel #1
0
        public byte[] ConvertToRaw()
        {
            IntPtr bits = IntPtr.Zero;

            bits = Marshal.AllocHGlobal(this.Height * this.Pitch);

            FreeImageApi.ConvertToRawBits(bits, m_Handle, this.Pitch, (uint)this.Bpp, (uint)0, (uint)0, (uint)0, false);
            byte[] bts = new byte[this.Height * this.Pitch];
            Marshal.Copy(bits, bts, 0, bts.Length);

            return(bts);
        }