Here you can find the source of toPixelFromByte(int byteValue)
private static float toPixelFromByte(int byteValue)
//package com.java2s; //License from project: Apache License public class Main { private static float toPixelFromByte(int byteValue) { return normalize(byteValue, 0, 255); }/*www.j a v a 2 s .c o m*/ private static float normalize(float d, float min, float max) { return (d - min) / (max - min); } }