diff --git a/src/engine/InterestManagement/HeightMap.java b/src/engine/InterestManagement/HeightMap.java index b399c912..af377ec6 100644 --- a/src/engine/InterestManagement/HeightMap.java +++ b/src/engine/InterestManagement/HeightMap.java @@ -20,6 +20,7 @@ import engine.objects.Zone; import org.pmw.tinylog.Logger; import javax.imageio.ImageIO; +import javax.imageio.ImageReader; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; @@ -30,6 +31,7 @@ import java.nio.file.Paths; import java.sql.ResultSet; import java.sql.SQLException; import java.util.HashMap; +import java.util.Iterator; import java.util.stream.Stream; import static java.lang.Math.abs; @@ -315,6 +317,11 @@ public class HeightMap { // Load pixel data + Iterator readers = ImageIO.getImageReadersByFormatName("TGA"); + while (readers.hasNext()) { + System.out.println("reader: " + readers.next()); + } + try (Stream filePathStream = Files.walk(Paths.get(ConfigManager.DEFAULT_DATA_DIR + "heightmaps/TARGA/"))) { filePathStream.forEach(filePath -> { @@ -323,6 +330,7 @@ public class HeightMap { try { BufferedImage heightmapImage = ImageIO.read(imageFile); + int width = heightmapImage.getWidth(); } catch (IOException e) { throw new RuntimeException(e); }