Skip to content

Commit

Permalink
Fix issue with newer apache-commons
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <tsmock@meta.com>
  • Loading branch information
tsmock committed Jun 14, 2024
1 parent 8350f90 commit 476996f
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
import org.apache.commons.imaging.ImageReadException;
import org.apache.commons.imaging.ImageWriteException;
import org.apache.commons.imaging.common.RationalNumber;
import org.apache.commons.imaging.formats.jpeg.exif.ExifRewriter;
import org.apache.commons.imaging.formats.jpeg.xmp.JpegXmpRewriter;
Expand Down Expand Up @@ -118,7 +116,7 @@ public void run() {
outputSet = new TiffOutputSet();
}
exifDirectory = outputSet.getOrCreateExifDirectory();
gpsDirectory = outputSet.getOrCreateGPSDirectory();
gpsDirectory = outputSet.getOrCreateGpsDirectory();

gpsDirectory.removeField(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF);
gpsDirectory.add(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION_REF,
Expand All @@ -139,7 +137,7 @@ public void run() {

final String xml = getXmpXml(img, mimg);

outputSet.setGPSInDegrees(mimg.lon(), mimg.lat());
outputSet.setGpsInDegrees(mimg.lon(), mimg.lat());
Path parentFile = file.getParent();
if (!Files.exists(parentFile) && !Files.isDirectory(parentFile)) {
Files.createDirectories(parentFile);
Expand Down Expand Up @@ -167,7 +165,7 @@ public void run() {
}
Thread.currentThread().interrupt();
return;
} catch (IOException | ImageReadException | ImageWriteException e) {
} catch (IOException e) {
Logging.error(e);
}

Expand Down

0 comments on commit 476996f

Please sign in to comment.