You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by js...@apache.org on 2019/06/17 09:14:01 UTC
[sis] branch geoapi-4.0 updated: Fix a copy/paster error in
RasterFactory, creating images with same width and height
This is an automated email from the ASF dual-hosted git repository.
jsorel pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
new f1a54a4 Fix a copy/paster error in RasterFactory, creating images with same width and height
f1a54a4 is described below
commit f1a54a4e0f914e4d5e1af1bd8e887b16d387b6f1
Author: jsorel <jo...@geomatys.com>
AuthorDate: Mon Jun 17 11:13:29 2019 +0200
Fix a copy/paster error in RasterFactory, creating images with same width and height
---
.../sis/internal/coverage/RasterFactory.java | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/RasterFactory.java b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/RasterFactory.java
index 261c968..2bdf919 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/RasterFactory.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/RasterFactory.java
@@ -16,28 +16,28 @@
*/
package org.apache.sis.internal.coverage;
-import java.nio.Buffer;
-import java.nio.ReadOnlyBufferException;
import java.awt.Point;
+import java.awt.image.BandedSampleModel;
+import java.awt.image.ComponentSampleModel;
import java.awt.image.DataBuffer;
import java.awt.image.DataBufferByte;
+import java.awt.image.DataBufferDouble;
+import java.awt.image.DataBufferFloat;
+import java.awt.image.DataBufferInt;
import java.awt.image.DataBufferShort;
import java.awt.image.DataBufferUShort;
-import java.awt.image.DataBufferInt;
-import java.awt.image.DataBufferFloat;
-import java.awt.image.DataBufferDouble;
-import java.awt.image.SampleModel;
-import java.awt.image.BandedSampleModel;
-import java.awt.image.ComponentSampleModel;
import java.awt.image.PixelInterleavedSampleModel;
import java.awt.image.RasterFormatException;
+import java.awt.image.SampleModel;
import java.awt.image.WritableRaster;
+import java.nio.Buffer;
+import java.nio.ReadOnlyBufferException;
+import org.apache.sis.internal.feature.Resources;
+import org.apache.sis.util.ArgumentChecks;
import org.apache.sis.util.ArraysExt;
import org.apache.sis.util.Numbers;
import org.apache.sis.util.Static;
import org.apache.sis.util.Workaround;
-import org.apache.sis.util.ArgumentChecks;
-import org.apache.sis.internal.feature.Resources;
/**
@@ -118,7 +118,7 @@ public final class RasterFactory extends Static {
* However this would require the creation of a PackedColorModel subclass. For SIS purposes,
* it is easier to create a banded sample model.
*/
- return WritableRaster.createBandedRaster(buffer, width, width, scanlineStride, new int[1], bandOffsets, location);
+ return WritableRaster.createBandedRaster(buffer, width, height, scanlineStride, new int[1], bandOffsets, location);
}
// else fallthrough.
}