Introduction In the previous post , I showed available tags in ExifTagConstants, TiffTagConstants, GpsTagConstants classes. In this post, I will show you code snippet for extracting metada from jpeg using the tags. In order to run example code, you should download commons-imaging.jar from here . Somehow the official homepage of Commons Imaging doesn't provide commons-imaging.jar!! Code package com.dulesoftware.image; import java.io.File; import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import org.apache.commons.imaging.ImageReadException; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.common.IImageMetadata; import org.apache.commons.imaging.common.IImageMetadata.IImageMetadataItem; import org.apache.commons.imaging.formats.jpeg.JpegImageMetadata; import org.apache.commons.imaging.formats.t
IT関連の技術やプログラミングを中心に記事を書いています。ハードウェアも好きなので、日々のちょっとしたお役立ち情報も投稿しています。