Revision: 6671
http://sourceforge.net/p/jump-pilot/code/6671
Author: michaudm
Date: 2021-02-08 22:57:44 +0000 (Mon, 08 Feb 2021)
Log Message:
-----------
Set bpp to 16b for flt, asc and txt
Modified Paths:
--------------
core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java
Modified: core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java
===================================================================
--- core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java
2021-01-03 13:25:09 UTC (rev 6670)
+++ core/trunk/src/org/openjump/core/rasterimage/RasterImageLayer.java
2021-02-08 22:57:44 UTC (rev 6671)
@@ -349,7 +349,10 @@
symbologyChanged = false;
this.setNeedToKeepImage(false);
if (bitsPerPixel == -1) {
- bitsPerPixel = Imaging.getImageInfo(new
File(imageFileName)).getBitsPerPixel();
+ if (imageFileName.toLowerCase().endsWith(".flt"))
bitsPerPixel = 16;
+ else if (imageFileName.toLowerCase().endsWith(".asc"))
bitsPerPixel = 16;
+ else if (imageFileName.toLowerCase().endsWith(".txt"))
bitsPerPixel = 16;
+ else bitsPerPixel = Imaging.getImageInfo(new
File(imageFileName)).getBitsPerPixel();
}
clearImageAndRaster(true);
// Check that there is enough free memory for the image + 1%
of available memory + 10Mb
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel