Skip to content

Instantly share code, notes, and snippets.

@dscho dscho/gist:2024565
Created Mar 12, 2012

Embed
What would you like to do?
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
You can’t perform that action at this time.