⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bitmover.java

📁 Mapserver的一个java客户端,包含两个applet支持地图显示。
💻 JAVA
字号:
// Copyright (C) 1998, 1999, 2001 Chris Nokleberg// Please see included LICENSE.TXTpackage com.sixlegs.image.png;import java.io.IOException;import java.io.InputStream;abstract class BitMover{    int trans = -1;    int transgray = -1;    int translow = -1;    int[] gammaTable;    abstract int fill(int[] pixels, InputStream str, int off, int len)    throws IOException;    static BitMover getBitMover(PngImage img)    throws PngException    {        StringBuffer clsname = new StringBuffer("com.sixlegs.image.png.BitMover");        clsname.append(img.data.header.depth);        if (img.data.header.paletteUsed) {            clsname.append('P');        } else {            clsname.append(img.data.header.colorUsed ? "RGB" : "G");        }        if (img.data.header.alphaUsed) clsname.append('A');        try {            BitMover b = (BitMover)Class.forName(clsname.toString()).newInstance();            b.gammaTable = img.data.gammaTable;            if (img.data.header.colorType == PngImage.COLOR_TYPE_GRAY ||                 img.data.header.colorType == PngImage.COLOR_TYPE_RGB) {                Chunk_tRNS trans = (Chunk_tRNS)img.getChunk(Chunk.tRNS);                if (trans != null) {                    b.trans = trans.rgb;                    b.translow = trans.rgb_low;                    b.transgray = trans.r;                }            }            return b;        } catch (Exception e) {            throw new PngException("Error loading " + clsname);        }    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -