From 3417cf014a65765e02696c1d121ce58b2b4a8aed Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期二, 08 四月 2025 15:55:36 +0800 Subject: [PATCH] 修改pom.xml --- src/main/java/com/se/simu/utils/TiffToRGBUtil.java | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/se/simu/utils/TiffToRGBUtil.java b/src/main/java/com/se/simu/utils/TiffToRGBUtil.java index 66a41bd..224ffb1 100644 --- a/src/main/java/com/se/simu/utils/TiffToRGBUtil.java +++ b/src/main/java/com/se/simu/utils/TiffToRGBUtil.java @@ -14,7 +14,7 @@ public class TiffToRGBUtil { public static void main(String[] args) throws Exception{ - tifToPng("D:\\鍩庡競鍐呮稘\\sem\\DEM100.tif","D:\\鍩庡競鍐呮稘\\sem\\DEM100.png"); + tifToPng("D:\\鍩庡競鍐呮稘\\sem\\tongzhou_1m_tif\\tongzhou_raster_4548_1m_clip_river_fill.tif","D:\\鍩庡競鍐呮稘\\sem\\tongzhou_1m_tif\\tongzhou_raster_4548_1m_clip_river_fill.png"); } public static void tifToPng(String tifPath, String pngPath) throws Exception { // 娉ㄥ唽鎵�鏈夌殑 GDAL 椹卞姩 @@ -51,7 +51,6 @@ int g = value / 256; int b = value % 256; Color color = new Color(r, g, b); - System.out.printf("Pixel (%d, %d): R=%d, G=%d, B=%d%n", x, y, r, g, b); int newRgb = color.getRGB(); // 灏嗗鐞嗗悗鐨勫儚绱犻鑹插�艰缃埌鏂扮殑 PNG 鍥惧儚涓� pngImage.setRGB(x, y, newRgb); -- Gitblit v1.9.3