Package org.boris.pecoff4j.resources

Examples of org.boris.pecoff4j.resources.IconDirectoryEntry


        return sfi;
    }

    public static IconDirectoryEntry readIconDirectoryEntry(IDataReader dr)
            throws IOException {
        IconDirectoryEntry ge = new IconDirectoryEntry();
        ge.setWidth(dr.readByte());
        ge.setHeight(dr.readByte());
        ge.setColorCount(dr.readByte());
        ge.setReserved(dr.readByte());
        ge.setPlanes(dr.readWord());
        ge.setBitCount(dr.readWord());
        ge.setBytesInRes(dr.readDoubleWord());
        ge.setOffset(dr.readDoubleWord());

        return ge;
    }
View Full Code Here


            IconImage[] images = new IconImage[gid.getCount()];
            icf.setImages(images);

            for (int j = 0; j < gid.getCount(); j++) {
                GroupIconDirectoryEntry gide = gid.getEntry(j);
                IconDirectoryEntry ide = new IconDirectoryEntry();
                ide.copyFrom(gide);
                icd.add(ide);
                ResourceEntry[] icos = ResourceHelper.findResources(rd,
                        ResourceType.ICON, gide.getId());
                if (icos == null || icos.length != 1) {
                    throw new IOException("Unexpected icons in resource file");
                }
                byte[] d = icos[0].getData();
                ide.setBytesInRes(d.length);
                // Check for PNG data
                if (gide.getWidth() == 0 && gide.getHeight() == 0) {
                    IconImage ii = ResourceParser.readPNG(d);
                    images[j] = ii;
                } else {
View Full Code Here

TOP

Related Classes of org.boris.pecoff4j.resources.IconDirectoryEntry

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.