Created
March 12, 2012 20:42
-
-
Save dscho/2024565 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ij/process/ColorProcessor.java b/ij/process/ColorProcessor.java | |
index a036cf4..f35f06c 100644 | |
--- a/ij/process/ColorProcessor.java | |
+++ b/ij/process/ColorProcessor.java | |
@@ -303,17 +303,9 @@ public class ColorProcessor extends ImageProcessor { | |
} | |
public final float getf(int index) { | |
- int c = pixels[index]; | |
- int r = (c&0xff0000)>>16; | |
- int g = (c&0xff00)>>8; | |
- int b = c&0xff; | |
- return (float)(r*rWeight + g*gWeight + b*bWeight); | |
+ return pixels[index]; | |
} | |
- //public final float getf(int index) { | |
- // return pixels[index]; | |
- //} | |
- | |
public final void setf(int index, float value) { | |
pixels[index] = (int)value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment