122 references to PixelFormat
System.Drawing.Common.Tests (84)
DrawingTest.cs (1)
14
BitmapData data = bitmap.LockBits(new Rectangle(default, bitmap.Size), ImageLockMode.ReadWrite, bitmap.
PixelFormat
);
mono\System.Drawing.Imaging\BmpCodecTests.cs (5)
48
Assert.Equal(PixelFormat.Format4bppIndexed, bmp.
PixelFormat
);
114
Assert.Equal(PixelFormat.Format8bppIndexed, bmp.
PixelFormat
);
180
Assert.Equal(PixelFormat.Format24bppRgb, bmp.
PixelFormat
);
384
Assert.Equal(PixelFormat.Format32bppRgb, bmp.
PixelFormat
);
444
Assert.Equal(expected, bmpLoad.
PixelFormat
);
mono\System.Drawing.Imaging\GifCodecTests.cs (2)
45
Assert.Equal(PixelFormat.Format8bppIndexed, bmp.
PixelFormat
);
198
Assert.Equal(expected, bmpLoad.
PixelFormat
);
mono\System.Drawing.Imaging\IconCodecTests.cs (9)
45
Assert.Equal(PixelFormat.Format32bppArgb, image.
PixelFormat
);
50
Assert.Equal(PixelFormat.Format32bppArgb, bmp.
PixelFormat
);
74
Assert.Equal(PixelFormat.Format32bppArgb, bmp.
PixelFormat
);
222
Assert.Equal(PixelFormat.Format32bppArgb, bmp.
PixelFormat
);
427
Assert.Equal(PixelFormat.Format32bppArgb, bmp.
PixelFormat
);
649
Assert.Equal(PixelFormat.Format32bppArgb, bmp.
PixelFormat
);
907
Assert.Equal(PixelFormat.Format32bppArgb, bmp.
PixelFormat
);
1841
Assert.Equal(PixelFormat.Format32bppArgb, bmp.
PixelFormat
);
1885
Assert.Equal(expected, bmpLoad.
PixelFormat
);
mono\System.Drawing.Imaging\JpegCodecTests.cs (3)
47
Assert.Equal(PixelFormat.Format8bppIndexed, bmp.
PixelFormat
);
174
Assert.Equal(PixelFormat.Format24bppRgb, bmp.
PixelFormat
);
363
Assert.Equal(expected, bmpLoad.
PixelFormat
);
mono\System.Drawing.Imaging\PngCodecTests.cs (4)
47
Assert.Equal(PixelFormat.Format1bppIndexed, bmp.
PixelFormat
);
250
Assert.Equal(PixelFormat.Format32bppArgb, bmp.
PixelFormat
);
357
Assert.Equal(PixelFormat.Format4bppIndexed, bmp.
PixelFormat
);
584
Assert.Equal(expected, bmpLoad.
PixelFormat
);
mono\System.Drawing.Imaging\TiffCodecTests.cs (2)
67
Assert.Equal(PixelFormat.Format24bppRgb, bmp.
PixelFormat
);
255
Assert.Equal(expected, bmpLoad.
PixelFormat
);
mono\System.Drawing\BitmapTests.cs (8)
339
Assert.Equal(bmp.
PixelFormat
, bmpNew.
PixelFormat
);
395
int pixels_per_byte = src.
PixelFormat
switch
400
_ => throw new InvalidOperationException($"Cannot pass a bitmap of format {src.
PixelFormat
} to RotateIndexedBmp"),
411
data = test.LockBits(new Rectangle(0, 0, test.Width, test.Height), ImageLockMode.ReadOnly, test.
PixelFormat
);
1176
b.
PixelFormat
.Should().Be(PixelFormat.Format32bppArgb, msg);
1265
Assert.Equal(PixelFormat.Format24bppRgb, bitmap.
PixelFormat
);
1291
Assert.Equal(PixelFormat.Format24bppRgb, bitmap.
PixelFormat
);
mono\System.Drawing\GraphicsTests.cs (1)
347
Assert.Equal(PixelFormat.Format4bppIndexed, img.
PixelFormat
);
System\Drawing\BitmapTests.cs (39)
48
Assert.Equal(pixelFormat, bitmap.
PixelFormat
);
61
Assert.Equal(pixelFormat, bitmap.
PixelFormat
);
90
Assert.Equal(PixelFormat.Format8bppIndexed, bitmap.
PixelFormat
);
124
Assert.Equal(pixelFormat, bitmap.
PixelFormat
);
138
Assert.Equal(pixelFormat, bitmap.
PixelFormat
);
167
Assert.Equal(PixelFormat.Format32bppArgb, bitmap.
PixelFormat
);
191
Assert.Equal(pixelFormat, bitmap.
PixelFormat
);
210
Assert.Equal(pixelFormat, bitmap.
PixelFormat
);
290
Assert.Equal(PixelFormat.Format32bppPArgb, bitmap.
PixelFormat
);
307
Assert.Equal(PixelFormat.Format32bppArgb, bitmap.
PixelFormat
);
324
Assert.Equal(PixelFormat.Format32bppArgb, bitmap.
PixelFormat
);
335
Assert.Equal(PixelFormat.Format32bppArgb, bitmap.
PixelFormat
);
376
Assert.Equal(targetFormat, clone.
PixelFormat
);
412
Assert.Equal(format, clone.
PixelFormat
);
426
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new Rectangle(0, 0, width, height), bitmap.
PixelFormat
));
427
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new RectangleF(0, 0, width, height), bitmap.
PixelFormat
));
440
Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new Rectangle(x, y, width, height), bitmap.
PixelFormat
));
441
Assert.Throws<OutOfMemoryException>(() => bitmap.Clone(new RectangleF(x, y, width, height), bitmap.
PixelFormat
));
606
Assert.Equal(PixelFormat.Format32bppRgb, result.
PixelFormat
);
619
Assert.Equal(PixelFormat.Format32bppRgb, result.
PixelFormat
);
628
Assert.Equal(PixelFormat.Format32bppRgb, result.
PixelFormat
);
703
Assert.Equal(PixelFormat.Format32bppArgb, result.
PixelFormat
);
754
Assert.Equal(expectedPngBitmap.
PixelFormat
, outputPngBitmap.
PixelFormat
);
1113
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadOnly, bitmap.
PixelFormat
));
1116
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadOnly, bitmap.
PixelFormat
, bitmapData));
1163
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, bitmap.
PixelFormat
));
1166
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, bitmap.
PixelFormat
, bitmapData));
1186
bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.
PixelFormat
);
1188
Assert.Throws<InvalidOperationException>(() => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.
PixelFormat
));
1189
Assert.Throws<InvalidOperationException>(() => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.
PixelFormat
, new BitmapData()));
1191
Assert.Throws<InvalidOperationException>(() => bitmap.LockBits(new Rectangle(1, 1, 1, 1), ImageLockMode.ReadOnly, bitmap.
PixelFormat
));
1192
Assert.Throws<InvalidOperationException>(() => bitmap.LockBits(new Rectangle(1, 1, 1, 1), ImageLockMode.ReadOnly, bitmap.
PixelFormat
, new BitmapData()));
1202
BitmapData data = bitmap.LockBits(new Rectangle(offset, offset, 1, 1), ImageLockMode.ReadOnly, bitmap.
PixelFormat
);
1213
BitmapData data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.
PixelFormat
);
1225
BitmapData data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.
PixelFormat
);
1249
BitmapData data = bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, bitmap.
PixelFormat
);
1653
bitmap.
PixelFormat
.Should().Be(format);
1687
bitmap.
PixelFormat
.Should().Be(format);
System\Drawing\IconTests.cs (2)
525
Assert.Equal(PixelFormat.Format32bppArgb, bitmap.
PixelFormat
);
563
Assert.Equal(PixelFormat.Format32bppArgb, bitmap.
PixelFormat
);
System\Drawing\TextureBrushTests.cs (8)
27
Assert.Equal(expectedPixelFormat, brushImage.
PixelFormat
);
68
Assert.Equal(expectedPixelFormat, brushImage.
PixelFormat
);
95
Assert.Equal(PixelFormat.Format32bppPArgb, brushImage.
PixelFormat
);
116
Assert.Equal(PixelFormat.Format32bppPArgb, brushImage.
PixelFormat
);
149
Assert.Equal(PixelFormat.Format32bppPArgb, brushImage.
PixelFormat
);
170
Assert.Equal(PixelFormat.Format32bppPArgb, brushImage.
PixelFormat
);
204
Assert.Equal(PixelFormat.Format32bppPArgb, brushImage.
PixelFormat
);
226
Assert.Equal(PixelFormat.Format32bppPArgb, brushImage.
PixelFormat
);
System.Windows.Forms (5)
System\Windows\Forms\Control.cs (1)
4878
using Bitmap image = new(width, height, bitmap.
PixelFormat
);
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
625
bmpData = tmpBitmap.LockBits(imageInfo.rcImage, ImageLockMode.ReadOnly, tmpBitmap.
PixelFormat
);
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (2)
112
if (Image.GetPixelFormatSize(image.
PixelFormat
) > 16)
392
if (Image.GetPixelFormatSize(image.
PixelFormat
) > 16)
System\Windows\Forms\Rendering\ControlPaint.cs (1)
2431
Bitmap result = new(bitmap.Width, bitmap.Height, bitmap.
PixelFormat
);
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ImageListImage.cs (1)
42
public PixelFormat PixelFormat => Image.
PixelFormat
;
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Internals\ScaleHelper.cs (1)
177
Bitmap scaledBitmap = new(desiredSize.Width, desiredSize.Height, bitmap.
PixelFormat
);
System.Windows.Forms.Tests (30)
System\Windows\Forms\AxHostTests.cs (2)
1625
Assert.Equal(PixelFormat.Format32bppRgb, result.
PixelFormat
);
1690
Assert.Equal(PixelFormat.Format32bppRgb, result.
PixelFormat
);
System\Windows\Forms\ControlPaintTests.cs (7)
41
Assert.Equal(PixelFormat.Format16bppRgb555, result.
PixelFormat
);
66
Assert.Equal(PixelFormat.Format16bppRgb555, result.
PixelFormat
);
112
Assert.Equal(PixelFormat.Format32bppRgb, result.
PixelFormat
);
144
Assert.Equal(PixelFormat.Format32bppRgb, result.
PixelFormat
);
177
Assert.Equal(PixelFormat.Format32bppRgb, result.
PixelFormat
);
220
Assert.Equal(PixelFormat.Format1bppIndexed, result.
PixelFormat
);
245
Assert.Equal(PixelFormat.Format1bppIndexed, result.
PixelFormat
);
System\Windows\Forms\ImageList.ImageCollectionTests.cs (21)
66
Assert.Equal(PixelFormat.Format32bppArgb, bitmap1.
PixelFormat
);
71
Assert.Equal(PixelFormat.Format32bppArgb, bitmap2.
PixelFormat
);
76
Assert.Equal(PixelFormat.Format32bppArgb, bitmap3.
PixelFormat
);
81
Assert.Equal(PixelFormat.Format32bppArgb, bitmap4.
PixelFormat
);
86
Assert.Equal(PixelFormat.Format32bppArgb, bitmap5.
PixelFormat
);
114
Assert.Equal(PixelFormat.Format32bppArgb, bitmap1.
PixelFormat
);
119
Assert.Equal(PixelFormat.Format32bppArgb, bitmap2.
PixelFormat
);
124
Assert.Equal(PixelFormat.Format32bppArgb, bitmap3.
PixelFormat
);
129
Assert.Equal(PixelFormat.Format32bppArgb, bitmap4.
PixelFormat
);
134
Assert.Equal(PixelFormat.Format32bppArgb, bitmap5.
PixelFormat
);
210
Assert.Equal(PixelFormat.Format32bppArgb, resultImage.
PixelFormat
);
273
Assert.Equal(PixelFormat.Format32bppArgb, bitmap.
PixelFormat
);
294
Assert.Equal(PixelFormat.Format32bppArgb, bitmap.
PixelFormat
);
360
Assert.Equal(PixelFormat.Format32bppArgb, result1.
PixelFormat
);
367
Assert.Equal(PixelFormat.Format32bppArgb, result1.
PixelFormat
);
1172
Assert.Equal(PixelFormat.Format32bppArgb, result1.
PixelFormat
);
1178
Assert.Equal(PixelFormat.Format32bppArgb, result2.
PixelFormat
);
1210
Assert.Equal(PixelFormat.Format32bppArgb, result1.
PixelFormat
);
1216
Assert.Equal(PixelFormat.Format32bppArgb, result2.
PixelFormat
);
1646
Assert.Equal(PixelFormat.Format32bppArgb, bitmap.
PixelFormat
);
1667
Assert.Equal(PixelFormat.Format32bppArgb, bitmap.
PixelFormat
);
System.Windows.Forms.UI.IntegrationTests (1)
Infra\ScreenRecordService.cs (1)
325
Bitmap croppedSource = frames[i].image.Clone(cropArea, frames[i].image.
PixelFormat
);