Skip to content

Instantly share code, notes, and snippets.

@dscho
Created March 12, 2012 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dscho/2024565 to your computer and use it in GitHub Desktop.
Save dscho/2024565 to your computer and use it in GitHub Desktop.
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