0
我正在使用javaxt-core庫從圖像中提取exif元。當我第一次做到這一點,腳本正在工作,我可以看到數據,但在第二張圖片上,我測試過它只顯示null。任何圖像和我測試的第一個圖像都是相同的情況。爲什麼exif元數據不顯示?
public static void main(String[] args) {
javaxt.io.Image image = new javaxt.io.Image("res/test.jpg");
java.util.HashMap<Integer, Object> exif = image.getExifTags();
System.out.println("New subfile type: " + exif.get(0x00FE));
System.out.println("Subfile type: " + exif.get(0x00FF));
System.out.println("Image Width: " + exif.get(0x0100));
System.out.println("Image Length: " + exif.get(0x0101));
System.out.println("Bits per sample: " + exif.get(0x0102));
System.out.println("Compression: " + exif.get(0x0103));
System.out.println("Photometric Interpretation: " + exif.get(0x0106));