Here you can find the source of rgb8ToRgbRBXG(byte[] rgb)
Parameter | Description |
---|---|
bs | a parameter |
public static short rgb8ToRgbRBXG(byte[] rgb)
//package com.java2s; /*/* w w w . j ava2s . c om*/ V99ColorMapUtils.java (c) 2012 Edward Swartz All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html */ public class Main { /** * @param bs * @return */ public static short rgb8ToRgbRBXG(byte[] rgb) { return (short) ((((rgb[0] >> 5) & 0x7) << 12) | (((rgb[2] >> 5) & 0x7) << 8) | (((rgb[1] >> 5) & 0x7) << 0)); } }