将逐行JPEG转换为基准JPEG

问题描述 投票:0回答:1

我正在使用下面的图形API从Azure AD获取用户个人资料图像。但是,当我尝试使用POSTMAN工具访问api时,它给了我一个PJPEG图像,然后我无法获得实际的图像。因此,有什么方法可以获取jpeg图像或将该pjpeg字节转换为base64,然后转换为图像。

请帮助。

Graph API

c# azure-active-directory jpeg image-compression
1个回答
0
投票

如果要用邮递员更新用户照片,请参考以下步骤

  1. 注册Azure AD应用程序

  2. 配置API权限enter image description here

  3. 在邮递员中获取访问令牌enter image description hereenter image description here

  4. 更新照片。我的测试pjpeg文件

PUT PUT https://graph.microsoft.com/v1.0/me/photo/$value
Content-type: image/pjpeg

Body: Binary data for the image

enter image description here

  1. 检查
GET https://graph.microsoft.com/v1.0/me/photo/$value

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.