29 references to ReadWrite
System.Drawing.Common.Tests (28)
DrawingTest.cs (1)
14
BitmapData data = bitmap.LockBits(new Rectangle(default, bitmap.Size), ImageLockMode.
ReadWrite
, bitmap.PixelFormat);
mono\System.Drawing\BitmapTests.cs (13)
64
BitmapData bd = bmp.LockBits(rect, ImageLockMode.
ReadWrite
, PixelFormat.Format24bppRgb);
74
bd = bmp.LockBits(rect, ImageLockMode.
ReadWrite
, PixelFormat.Format8bppIndexed, bd);
568
byte[] actual = HashLock(bmp, bmp.Width, bmp.Height, PixelFormat.Format32bppArgb, ImageLockMode.
ReadWrite
);
581
byte[] actual = HashLock(bmp, bmp.Width, bmp.Height, PixelFormat.Format32bppPArgb, ImageLockMode.
ReadWrite
);
594
byte[] actual = HashLock(bmp, bmp.Width, bmp.Height, PixelFormat.Format32bppRgb, ImageLockMode.
ReadWrite
);
607
byte[] actual = HashLock(bmp, bmp.Width, bmp.Height, PixelFormat.Format24bppRgb, ImageLockMode.
ReadWrite
);
623
byte[] actual = HashLock(bmp, 50, 50, PixelFormat.Format32bppArgb, ImageLockMode.
ReadWrite
);
636
byte[] actual = HashLock(bmp, 50, 50, PixelFormat.Format32bppPArgb, ImageLockMode.
ReadWrite
);
649
byte[] actual = HashLock(bmp, 50, 50, PixelFormat.Format32bppRgb, ImageLockMode.
ReadWrite
);
662
byte[] actual = HashLock(bmp, 50, 50, PixelFormat.Format24bppRgb, ImageLockMode.
ReadWrite
);
715
data = bmp.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.
ReadWrite
, PixelFormat.Format32bppArgb);
759
data = bmp.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.
ReadWrite
, PixelFormat.Format24bppRgb);
804
BitmapData data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.
ReadWrite
, PixelFormat.Format1bppIndexed);
System\Drawing\BitmapTests.cs (14)
1015
yield return new object[] { bitmap(), new Rectangle(0, 0, 2, 2), ImageLockMode.
ReadWrite
, PixelFormat.Format32bppArgb, 8, 3 };
1019
yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.
ReadWrite
, PixelFormat.Format32bppRgb, 400, 3 };
1023
yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.
ReadWrite
, PixelFormat.Format24bppRgb, 300, 65539 };
1027
yield return new object[] { new Bitmap(100, 100, PixelFormat.Format24bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.
ReadWrite
, PixelFormat.Format24bppRgb, 300, 3 };
1031
yield return new object[] { new Bitmap(100, 100, PixelFormat.Format24bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.
ReadWrite
, PixelFormat.Format32bppRgb, 400, 65539 };
1037
yield return new object[] { new Bitmap(100, 100, PixelFormat.Format8bppIndexed), new Rectangle(0, 0, 100, 100), ImageLockMode.
ReadWrite
, PixelFormat.Format8bppIndexed, 100, 3 };
1041
yield return new object[] { new Bitmap(184, 184, PixelFormat.Format1bppIndexed), new Rectangle(0, 0, 184, 184), ImageLockMode.
ReadWrite
, PixelFormat.Format1bppIndexed, 24, 3 };
1045
yield return new object[] { bitmap(), new Rectangle(1, 1, 1, 1), ImageLockMode.
ReadWrite
, PixelFormat.Format32bppArgb, 8, 3 };
1053
yield return new object[] { new Bitmap(100, 100, PixelFormat.Format32bppRgb), new Rectangle(0, 0, 100, 100), ImageLockMode.
ReadWrite
, PixelFormat.Format8bppIndexed, 100, 65539 };
1056
yield return new object[] { new Bitmap(100, 100, PixelFormat.Format8bppIndexed), new Rectangle(0, 0, 100, 100), ImageLockMode.
ReadWrite
, PixelFormat.Format24bppRgb, 300, 65539 };
1149
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.
ReadWrite
, PixelFormat.Format16bppGrayScale));
1150
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.
ReadWrite
, PixelFormat.Format16bppGrayScale, new BitmapData()));
1503
data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.
ReadWrite
, PixelFormat.Format32bppArgb);
1546
data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.
ReadWrite
, PixelFormat.Format24bppRgb);
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DesignerUtils.cs (1)
671
BitmapData data = b.LockBits(new Rectangle(0, 0, b.Width, b.Height), ImageLockMode.
ReadWrite
, PixelFormat.Format32bppArgb);