chunk_gama.java

来自「Mapserver的一个java客户端,包含两个applet支持地图显示。」· Java 代码 · 共 41 行

JAVA
41
字号
// Copyright (C) 1998, 1999, 2001 Chris Nokleberg// Please see included LICENSE.TXTpackage com.sixlegs.image.png;import java.io.IOException;final class Chunk_gAMAextends Chunk{    Chunk_gAMA()    {        super(gAMA);    }    protected boolean multipleOK()    {        return false;    }    protected boolean beforeIDAT()    {        return true;    }    protected void readData()    throws IOException    {        if (img.data.palette != null)             throw new PngException("gAMA chunk must precede PLTE chunk");        if (length != 4) badLength(4);        long gamma = in_data.readUnsignedInt();        if (gamma == 0)            throw new PngExceptionSoft("Meaningless zero gAMA chunk value");        if (img.getChunk(sRGB) == null)            img.data.properties.put("gamma", new Long(gamma));    }}

⌨️ 快捷键说明

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