12 references to CreateFromPixels
Microsoft.ML.ImageAnalytics (1)
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 (2)
Dynamic\Transforms\ApplyONNXModelWithInMemoryImages.cs (1)
118
Image = MLImage.
CreateFromPixels
(width, height, MLPixelFormat.Bgra32, imageData);
Dynamic\Transforms\ImageAnalytics\ConvertToGrayScaleInMemory.cs (1)
110
Image = MLImage.
CreateFromPixels
(width, height, MLPixelFormat.Bgra32, imageData);
Microsoft.ML.Tests (8)
ImagesTests.cs (8)
325
Image = MLImage.
CreateFromPixels
(width, height, MLPixelFormat.Bgra32, imageData);
1253
using MLImage image3 = MLImage.
CreateFromPixels
(image1.Width, image1.Height, image1.PixelFormat, image1.Pixels);
1268
Assert.Throws<ArgumentException>(() => MLImage.
CreateFromPixels
(10, 10, MLPixelFormat.Unknown, Array.Empty<byte>()));
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]);