Here you can find the source of rgb565ToRGB(short pixel, byte[] rgb)
public static void rgb565ToRGB(short pixel, byte[] rgb)
//package com.java2s; /*//w w w.j a v a 2 s.c o m ColorMapUtils.java (c) 2011-2013 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 { public static void rgb565ToRGB(short pixel, byte[] rgb) { int r = (pixel >> 11) & 0x1f; int g = (pixel >> 5) & 0x3f; int b = (pixel) & 0x1f; rgb[0] = (byte) (r * 0xff / 0x1f); rgb[1] = (byte) (g * 0xff / 0x3f); rgb[2] = (byte) (b * 0xff / 0x1f); } }