dxtcompressor.java
来自「world wind java sdk 源码」· Java 代码 · 共 52 行
JAVA
52 行
/* Copyright (C) 2001, 2008 United States Government as represented bythe Administrator of the National Aeronautics and Space Administration.All Rights Reserved.*/package gov.nasa.worldwind.formats.dds;/** * The <code>DXTCompressor</code> interface will compress an in-memory image using one of the DXT block compression * schemes. The details of each block compression scheme is handled by the implementation. * * @author dcollins * @version $Id: DXTCompressor.java 8915 2009-02-19 21:31:36Z dcollins $ */public interface DXTCompressor{ /** * Returns the DXT format constant associated with this compressor. * * @see gov.nasa.worldwind.formats.dds.DDSConstants * * @return DXT format for this compressor. */ int getDXTFormat(); /** * Returns the compressed size in bytes of the specified <code>image</code>. * * @param image the image to compute the compressed size for. * @param attributes the attributes that may affect the compressed size. * * @return compressed size in bytes of the specified image. * @throws IllegalArgumentException if either <code>image</code> or <code>attributes</code> is null. */ int getCompressedSize(java.awt.image.BufferedImage image, DXTCompressionAttributes attributes); /** * Encodes the specified <code>image</code> image into a compressed DXT codec, and writes the compressed bytes * to the specified <code>buffer</code>. The buffer should be allocated with enough space to hold the compressed * output. The correct size should be computed by calling <code>getCompressedSize(image, attributes)</code>. * * @param image the image to compress. * @param attributes the attributes that may affect the compression. * @param buffer the buffer that will receive the compressed output. * * @see #getCompressedSize(java.awt.image.BufferedImage, DXTCompressionAttributes) * @throws IllegalArgumentException if any of <code>image</code>, <code>attributes</code>, or * <code>buffer</code> are null. */ void compressImage(java.awt.image.BufferedImage image, DXTCompressionAttributes attributes, java.nio.ByteBuffer buffer);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?