Package bdsup2sub.bitmap

Examples of bdsup2sub.bitmap.Palette


     * @param pic SubPicture object containing info about the caption
     * @param pal base palette
     * @return decoded palette
     */
    public static Palette decodePalette(SubPictureDVD pic, Palette pal) {
        Palette miniPal = new Palette(4, true);
        for (int i=0; i < 4; i++) {
            int a = (pic.getAlpha()[i] * 0xff) / 0xf;
            if (a >= configuration.getAlphaCrop()) {
                miniPal.setRGB(i, pal.getR()[pic.getPal()[i]]&0xff, pal.getG()[pic.getPal()[i]]&0xff, pal.getB()[pic.getPal()[i]]&0xff);
                miniPal.setAlpha(i, a);
            } else {
                miniPal.setARGB(i, 0);
            }
        }
        return miniPal;
    }
View Full Code Here

TOP

Related Classes of bdsup2sub.bitmap.Palette

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.