Package cc.plural.utils

Examples of cc.plural.utils.PNGDecoder.decode()


            textureWidth = decoder.getWidth();
            textureHeight = decoder.getHeight();

            // Decode the PNG file in a ByteBuffer
            imageBuffer = ByteBuffer.allocateDirect(4 * decoder.getWidth() * decoder.getHeight());
            decoder.decode(imageBuffer, decoder.getWidth() * 4, PNGDecoder.Format.RGBA);
            imageBuffer.flip();
        } catch (IOException e) {
            throw new RuntimeException("Clean this up:" + e);
        }
    }
View Full Code Here



            // Decode the PNG file in a ByteBuffer
            buf = ByteBuffer.allocateDirect(
                    4 * decoder.getWidth() * decoder.getHeight());
            decoder.decode(buf, decoder.getWidth() * 4, Format.RGBA);
            buf.flip();

        } catch(IOException e) {
            throw new RuntimeException("Clean this up:" + e);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.