EncodeContent() public method

public EncodeContent ( byte bytes ) : void
bytes byte
return void
コード例 #1
0
ファイル: VisionRequestBody.cs プロジェクト: DiUS/3DiUS
    public static VisionRequestBody Default(byte[] content = null)
    {
        VisionImage image = new VisionImage();
        if (content != null)
        {
            image.EncodeContent(content);
        }

        VisionFeature feature = new VisionFeature();
        feature.type = Enum.GetName(typeof(VisionFeature.FeatureType), 0);

        VisionRequest request = new VisionRequest();
        request.features = new VisionFeature[] { feature };
        request.image = image;

        VisionRequestBody body = new VisionRequestBody();
        body.requests = new VisionRequest[] { request};

        return body;
    }