From 715bde8358baa71504dde231f1ca379d0472ac70 Mon Sep 17 00:00:00 2001 From: Harald Kuhr Date: Sat, 10 Apr 2021 18:17:01 +0200 Subject: [PATCH] Comment too. --- .../com/twelvemonkeys/imageio/plugins/jpeg/LuminanceToGray.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imageio/imageio-jpeg/src/main/java/com/twelvemonkeys/imageio/plugins/jpeg/LuminanceToGray.java b/imageio/imageio-jpeg/src/main/java/com/twelvemonkeys/imageio/plugins/jpeg/LuminanceToGray.java index 9635afe8..268509d6 100644 --- a/imageio/imageio-jpeg/src/main/java/com/twelvemonkeys/imageio/plugins/jpeg/LuminanceToGray.java +++ b/imageio/imageio-jpeg/src/main/java/com/twelvemonkeys/imageio/plugins/jpeg/LuminanceToGray.java @@ -58,7 +58,7 @@ final class LuminanceToGray implements RasterOp { dest = createCompatibleDestRaster(src); } - // If src and dest have alpha component, keep it, otherwise extract luma only + // If src and dest have alpha component, keep it, otherwise extract luminance only int[] bandList = src.getNumBands() > 3 && dest.getNumBands() > 1 ? new int[] {0, 3} : new int[] {0}; dest.setRect(0, 0, src.createChild(0, 0, src.getWidth(), src.getHeight(), 0, 0, bandList));