duanjiao8007 2012-08-18 14:46 采纳率: 100%
浏览 179
已采纳

如何更改图像的类型(mime类型)?

When I upload an image to FB, it has image/png type (or image/gif). But when I download back my uploaded image it has image/jpeg type already. How to change types? Is it just enough to save the image with different extension? I'v tried and it works, but is it the right way?

  • 写回答

1条回答 默认 最新

  • dongxiong1941 2012-08-18 14:51
    关注

    Is it just enough to save the image with different extension?

    Only if the file type detection code is broken. If it only checks the extension then sure, this will fool it. If it, you know, actually looks at the file contents then no, this won't help; you'd have to use something like ImageMagick's convert to transcode the image.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部