search

Home  >  Q&A  >  body text

把图片转成base64之后,上传到Java后台,如何判断原来图片的格式?

我后台收到了字符串,解析成图片的时候,如何判断图片的原来的格式?

黄舟黄舟2770 days ago1032

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-18 09:19:53

    Convert the image to base64 encoding. The type of the file will be indicated at the beginning, such as the data:image/image type mentioned above.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:19:53

    data:image/png;base64,

    Don’t they all have heads similar to this?

    reply
    0
  • Cancelreply