ExifInterface:由于未定义标签号,因此在压缩图像时跳过标签条目

时间:2018-09-13 08:42:51

标签: java android interface exif image-compression

我要压缩文件夹中的所有图像,并且我使用了This Compressor Library

我在压缩文件时收到了这种类型的警告,我不明白我对图像压缩或覆盖接口方法发出了警告。

ExifInterface: Skip the tag entry since tag number is not defined: 544 
Skip the tag entry since tag number is not defined: 545 
Skip the tag entry since tag number is not defined: 546 
Skip the tag entry since tag number is not defined: 547 
Skip the tag entry since tag number is not defined: 548 
Skip the tag entry since tag number is not defined: 549 
Skip the tag entry since tag number is not defined: 2

代码:

@Override
public void setQualityRatio(Integer qualityNum) {

for (int i=0; i<orgFileList.size(); i++){

    try {
        File file = new Compressor(CompressMultipleActivity.this).setQuality(qualityNum).compressToFile(orgFileList.get(i));
        currFileList.set(i, file);

    }catch (IOException e){
        Toast.makeText(CompressMultipleActivity.this, "Failed to compress image, Try again later!", Toast.LENGTH_SHORT).show();
    }
}
}

我这里的问题是什么?为什么我收到此警告,以及如何解决此问题?

救救我!在此先感谢!

1 个答案:

答案 0 :(得分:1)

问题是该库已过时,它使用内置的ExifInterface(缺少很多标记定义),而不是support ExifInterface,它会定期更新。