ImageIO - 获取图像类型和exif数据 [英] ImageIO - get image type and exif data

查看:154
本文介绍了ImageIO - 获取图像类型和exif数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

鉴于一些源文件(或更通用的 - 输入流),我需要找出

Given some source file (or more generic - input stream), I need to find out


  • 是图像

  • 如果是图像,则检索其类型(png / jpeg / gif / etc)

  • 检索exif数据(如果有)

我查看了API,但目前尚不清楚如何获取图像类型或Exif数据。

I looked at the API, but it is not clear how to get the type of image or Exif data.

推荐答案

上次我不得不这样做,几年前,标准API无法读取EXIF数据。这个库可以这样做:

Last time I had to do this, a couple of years ago, the standard API couldn't read EXIF data. This library can do so though:

http: //www.drewnoakes.com/code/exif/

这篇关于ImageIO - 获取图像类型和exif数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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