다음을 통해 공유


ImageVariableDescriptorPreview.BitmapPixelFormat 속성

정의

더 이상 사용되지 않습니다. 이미지의 픽셀 형식을 가져옵니다.

public:
 property BitmapPixelFormat BitmapPixelFormat { BitmapPixelFormat get(); };
BitmapPixelFormat BitmapPixelFormat();
/// [get: Windows.Foundation.Metadata.Deprecated("Use IImageFeatureDescriptor instead of IImageVariableDescriptorPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
BitmapPixelFormat BitmapPixelFormat();
public BitmapPixelFormat BitmapPixelFormat { get; }
public BitmapPixelFormat BitmapPixelFormat { [Windows.Foundation.Metadata.Deprecated("Use IImageFeatureDescriptor instead of IImageVariableDescriptorPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")] get; }
var bitmapPixelFormat = imageVariableDescriptorPreview.bitmapPixelFormat;
Public ReadOnly Property BitmapPixelFormat As BitmapPixelFormat

속성 값

이미지의 픽셀 형식입니다.

특성

예제

public void Evaluator(LearningModelPreview model)
{
	// Retrieve the first input feature which is an image
    ILearningModelVariableDescriptorPreview inputImageFeatureDescription = model.Description.InputFeatures.FirstOrDefault(feature=>feature.ModelFeatureKind == LearningModelFeatureKindPreview.Image);

    ImageVariableDescriptorPreview imageDescriptor = (ImageVariableDescriptorPreview)inputImageFeatureDescription;

	// Ensure the input feature handles the format RGBA8
    if (imageDescriptor.BitmapPixelFormat != BitmapPixelFormat.Rgba8)
    {
        Console.WriteLine($"Input Feature Name: {imageDescriptor.Name}. Format not supported.");
    }

 }

설명

경고

더 이상 사용되지 않는 API입니다. 대신 Windows.AI.MachineLearning 네임스페이스를 사용하세요.

적용 대상