sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 02/02: Documentation fix: the "Supported by" column is not relevant anymore.
Date Tue, 08 Dec 2020 10:07:21 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 78cb5999453f91ab00b46848b8799aae30c85a3c
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Tue Dec 8 11:02:00 2020 +0100

    Documentation fix: the "Supported by" column is not relevant anymore.
---
 .../src/main/java/org/apache/sis/image/PixelIterator.java    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/PixelIterator.java b/core/sis-feature/src/main/java/org/apache/sis/image/PixelIterator.java
index 1ad8820..aa39093 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/PixelIterator.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/PixelIterator.java
@@ -275,9 +275,9 @@ public abstract class PixelIterator {
          *
          * <table class="sis">
          *   <caption>Supported iteration order</caption>
-         *   <tr><th>Value</th>                         <th>Iteration
order</th>                                <th>Supported on</th></tr>
-         *   <tr><td>{@code null}</td>                  <td>Most
efficient iteration order.</td>                <td>Image and raster</td></tr>
-         *   <tr><td>{@link SequenceType#LINEAR}</td>   <td>From
left to right, then from top to bottom.</td>   <td>Raster only</td></tr>
+         *   <tr><th>Value</th>                         <th>Iteration
order</th></tr>
+         *   <tr><td>{@code null}</td>                  <td>Most
efficient iteration order.</td></tr>
+         *   <tr><td>{@link SequenceType#LINEAR}</td>   <td>From
left to right, then from top to bottom.</td></tr>
          * </table>
          *
          * Any other {@code order} value will cause an {@link IllegalArgumentException} to
be thrown.
@@ -333,9 +333,6 @@ public abstract class PixelIterator {
         public PixelIterator create(RenderedImage data) {
             ArgumentChecks.ensureNonNull("data", data);
             data = unwrap(data);
-            if (data instanceof BufferedImage) {
-                return create(((BufferedImage) data).getRaster());
-            }
             /*
              * Note: As of Java 14, `BufferedImage.getTileGridXOffset()` and `getTileGridYOffset()`
have a bug.
              * They should return `BufferedImage.getMinX()` (which is always 0) because the
image contains only
@@ -345,6 +342,9 @@ public abstract class PixelIterator {
              *
              * Issue tracker: https://bugs.openjdk.java.net/browse/JDK-8166038
              */
+            if (data instanceof BufferedImage) {
+                return create(((BufferedImage) data).getRaster());
+            }
             if (order == SequenceType.LINEAR) {
                 return new LinearIterator(data, null, subArea, window);
             } else if (order != null) {


Mime
View raw message