12 references to CreateFromPixels
Microsoft.ML.ImageAnalytics (1)
VectorToImageTransform.cs (1)
418dst = MLImage.CreateFromPixels(width, height, MLPixelFormat.Bgra32, imageData);
Microsoft.ML.OnnxTransformerTest (1)
OnnxTransformTests.cs (1)
616Image = MLImage.CreateFromPixels(Width, Height, MLPixelFormat.Bgra32, imageData);
Microsoft.ML.Samples (2)
Dynamic\Transforms\ApplyONNXModelWithInMemoryImages.cs (1)
118Image = MLImage.CreateFromPixels(width, height, MLPixelFormat.Bgra32, imageData);
Dynamic\Transforms\ImageAnalytics\ConvertToGrayScaleInMemory.cs (1)
110Image = MLImage.CreateFromPixels(width, height, MLPixelFormat.Bgra32, imageData);
Microsoft.ML.Tests (8)
ImagesTests.cs (8)
325Image = MLImage.CreateFromPixels(width, height, MLPixelFormat.Bgra32, imageData); 1253using MLImage image3 = MLImage.CreateFromPixels(image1.Width, image1.Height, image1.PixelFormat, image1.Pixels); 1268Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Unknown, Array.Empty<byte>())); 1269Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Bgra32, Array.Empty<byte>())); 1270Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(0, 10, MLPixelFormat.Bgra32, new byte[10])); 1271Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 0, MLPixelFormat.Bgra32, new byte[10])); 1272Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Bgra32, new byte[401])); 1309MLImage image = MLImage.CreateFromPixels(10, 10, MLPixelFormat.Bgra32, new byte[10 * 10 * 4]);