You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/01/19 03:59:30 UTC

[GitHub] [commons-imaging] kinow commented on a change in pull request #114: imaging.color extension/fix. More precision, DIN99b + DIN99o added to ColorConversion, division by zero error fixed.

kinow commented on a change in pull request #114:
URL: https://github.com/apache/commons-imaging/pull/114#discussion_r559898056



##########
File path: src/main/java/org/apache/commons/imaging/color/ColorCieLch.java
##########
@@ -19,10 +19,14 @@
 /**
  * Represents a color in the CIELCH color space.
  *
- * <p>Contains the constant values for black, white, red,
- * green, and blue.</p>
+ * <p>
+ * Contains the constant values for black, white, red,
+ * green, and blue.
+ * </p>
+ * Changes: H renamed to h.

Review comment:
       The changes must be documented in a JIRA issue and linked to the changelog (i.e. the JIRA number is added to src/changes/changes.xml later, used to generate the changes report from the project site).

##########
File path: src/main/java/org/apache/commons/imaging/color/ColorConversions.java
##########
@@ -643,28 +602,30 @@ private static int convertRGBtoRGB(int red, int green, int blue) {
         return rgb;
     }
 
+    private static int convertRGBtoRGB(final Color color) {
+        return color.getRGB() | 0xff << 24; // alpha channel always opaque
+    }

Review comment:
       Ideally we would limit awt use, or remove it, so that users can use Imaging for Android apps too (we have one user with a workaround on his code at the moment). Unless that makes maintaining the code extremely difficult, in which case we can just try to figure out another way to provide a version compatible with Android...




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org