41 references to Bgra32
Microsoft.ML.ImageAnalytics (6)
ImagePixelExtractor.cs (1)
368
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
MLImage.cs (4)
83
if (pixelFormat != MLPixelFormat.
Bgra32
&& pixelFormat != MLPixelFormat.Rgba32)
103
SKBitmap image = new SKBitmap(new SKImageInfo(width, height, pixelFormat == MLPixelFormat.
Bgra32
? SKColorType.Bgra8888 : SKColorType.Rgba8888));
267
SKColorType.Bgra8888 => MLPixelFormat.
Bgra32
,
285
return MLPixelFormat.
Bgra32
;
VectorToImageTransform.cs (1)
418
dst = MLImage.CreateFromPixels(width, height, MLPixelFormat.
Bgra32
, imageData);
Microsoft.ML.OnnxTransformerTest (1)
OnnxTransformTests.cs (1)
616
Image = MLImage.CreateFromPixels(Width, Height, MLPixelFormat.
Bgra32
, imageData);
Microsoft.ML.Samples (4)
Dynamic\Transforms\ApplyONNXModelWithInMemoryImages.cs (1)
118
Image = MLImage.CreateFromPixels(width, height, MLPixelFormat.
Bgra32
, imageData);
Dynamic\Transforms\ImageAnalytics\ConvertToGrayScaleInMemory.cs (3)
45
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
53
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
110
Image = MLImage.CreateFromPixels(width, height, MLPixelFormat.
Bgra32
, imageData);
Microsoft.ML.Tests (30)
ImagesTests.cs (30)
213
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
263
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
286
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
325
Image = MLImage.CreateFromPixels(width, height, MLPixelFormat.
Bgra32
, imageData);
378
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
386
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
453
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
461
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
529
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
537
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
604
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
612
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
679
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
687
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
755
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
763
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
830
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
838
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
906
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
914
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
980
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
988
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
1033
MLPixelFormat.
Bgra32
=> (3, 2, 1, 0),
1246
Assert.True(image1.PixelFormat == MLPixelFormat.Rgba32 || image1.PixelFormat == MLPixelFormat.
Bgra32
);
1269
Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.
Bgra32
, Array.Empty<byte>()));
1270
Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(0, 10, MLPixelFormat.
Bgra32
, new byte[10]));
1271
Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 0, MLPixelFormat.
Bgra32
, new byte[10]));
1272
Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.
Bgra32
, new byte[401]));
1309
MLImage image = MLImage.CreateFromPixels(10, 10, MLPixelFormat.
Bgra32
, new byte[10 * 10 * 4]);
1315
Assert.Equal(MLPixelFormat.
Bgra32
, image.PixelFormat);