コード例 #1
0
ファイル: MyImg.cs プロジェクト: ProcopioPi/ColorFinderHSV
        private void Create(Bitmap bmp)
        {
            Create();
            //********************************************
            newBmp = new Bitmap(bmp);//used to create a 32bppPArgb
            bitmap = new LockBitmap(newBmp);

            LockBitmap.LockBits();
            Marshal.Copy(LockBitmap.Pixels, 0, ptr_Address, LockBitmap.Pixels.Length);
            LockBitmap.UnlockBits();
        }
コード例 #2
0
ファイル: MyImg.cs プロジェクト: ProcopioPi/HARRIS
        private void Create(Bitmap bmp)
        {
            Create();
            //********************************************
            newBmp = new Bitmap(bmp);//used to create a 32bppPArgb
            bitmap = new LockBitmap(newBmp);

            bitmap.LockBits();
            Marshal.Copy(bitmap.Pixels, 0, ptr_Address, bitmap.Pixels.Length);
            bitmap.UnlockBits();

            newBmp.Dispose();
            bitmap.Pixels = new byte[0];
            bitmap        = null;
        }