日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Android >内容正文

Android

android获取图片格式,Android得到图片的真实格式——从本地文件或者网络文件流...

發布時間:2024/7/23 Android 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 android获取图片格式,Android得到图片的真实格式——从本地文件或者网络文件流... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

ImageFormat

Features

支持從InputStream或者File解析四種格式:jpg 、 png 、 webp 、 gif

從文件本身解析格式,而不是從擴展名獲取

FormatHelper.getFormat(InputStream inputStream)

FormatHelper.getFormat(File file)

Usage

Step 1

Step 2

解析格式

String FormatHelper.getFormat(InputStream inputStream)

或者

String FormatHelper.getFormat(File file)

返回值為jpg 、 png 、 webp 、 gif中的一個

Proguard

無需配置混淆規則

Tip

使用前請查看demo

若對你有幫助請加星

About Me

License

The MIT License (MIT)

Copyright (c) 2020 ImageFormat

Permission is hereby granted, free of charge, to any person obtaining a copy

of this software and associated documentation files (the "Software"), to deal

in the Software without restriction, including without limitation the rights

to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

copies of the Software, and to permit persons to whom the Software is

furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in

all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,

OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN

THE SOFTWARE.

總結

以上是生活随笔為你收集整理的android获取图片格式,Android得到图片的真实格式——从本地文件或者网络文件流...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。