如何以png格式获取Facebook个人资料图片? [英] How to fetch facebook profile picture in png format?

查看:152
本文介绍了如何以png格式获取Facebook个人资料图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想以编程方式获取Facebook个人资料图片,然后将其作为纹理加载到引擎中。因为我们的引擎只支持几种图片格式(bmp,tga,png),我想以png格式从Facebook获取图片。



现在我看到有两种格式个人资料图片,gif为那些没有上传图片和JPG的人。



提前感谢。

解决方案

您有答案 - Facebook只能通过API返回GIF或JPG图片 - 如果无法存储JPG,则需要将其转换为自己的代码>

I want to fetch facebook profile picture programmatically and then load it as texture in our engine. Since our engine supports only several picture formats (bmp, tga, png) I want to fetch picture from facebook in png format.

Now I see that there are two formats of profile pictures, gif for those who have not uploaded picture and jpg for those who have.

Thanks in advance.

解决方案

You have your answer there - Facebook only returns GIF or JPG images via the API - you'll need to convert them in your own code if you can't store JPG

这篇关于如何以png格式获取Facebook个人资料图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆