JHeader

码农软件 · 软件分类 · 图形/图像处理 · 2019-09-07 17:59:24

软件介绍

这是一个小巧的相片Exif信息读取和修改的Java库。它同时是一个可执行程序,但代码是开源的,可以通过看代码提取出接口自己调用。

一个读取Exif和修改拍照日期的例子:

 

import java.util.Map;
import java.util.SortedMap;

import net.sourceforge.jheader.App1Header;
import net.sourceforge.jheader.JpegHeaders;
import net.sourceforge.jheader.TagValue;
import net.sourceforge.jheader.App1Header.Tag;

public class Main {

	public static void main(String[] args) throws Exception {
		String filename = "IMG_1062.JPG";

		JpegHeaders jpegHeaders = new JpegHeaders(filename);

		// EXIF
		App1Header exifHeader = jpegHeaders.getApp1Header();

		// 遍历显示EXIF
		SortedMap tags = exifHeader.getTags();
		for (Map.Entry entry : tags.entrySet()) {
			System.out.println(entry.getKey() + "[" + entry.getKey().name
					+ "]:" + entry.getValue());
		}

		// 修改EXIF的拍照日期
		exifHeader.setValue(Tag.DATETIMEORIGINAL, "2007:11:04 07:42:56");
		// 保存
		jpegHeaders.save(true);

	}
}

 

本文地址:https://codercto.com/soft/d/14092.html

Developing Large Web Applications

Developing Large Web Applications

Kyle Loudon / Yahoo Press / 2010-3-15 / USD 34.99

As web applications grow, so do the challenges. These applications need to live up to demanding performance requirements, and be reliable around the clock every day of the year. And they need to withs......一起来看看 《Developing Large Web Applications》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码