Overview | Package | Class | Use | Tree | Index | Help
| NASA World Wind
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gov.nasa.worldwind
Class DDSConverter

    java.lang.Object
      gov.nasa.worldwind.DDSConverter

    public class DDSConverter

extends Object

Nested Class Summary
`protected static class` | `DDSConverter.Color`
`protected static class` | `DDSConverter.TransparentColor`

Constructor Summary
`DDSConverter()`

Method Summary
`protected static void` | `buildHeaderDxt1(ByteBuffer buffer, int width, int height)`
`protected static void` | `buildHeaderDxt3(ByteBuffer buffer, int width, int height)`
`protected static long` | `computeBitMask(DDSConverter.Color[] colors, int[] extremaIndices)`
`protected static long` | `computeBitMask(DDSConverter.TransparentColor[] colors, int[] extremaIndices)`
`static ByteBuffer` | `convertToDxt1NoTransparency(ByteBuffer image, String mimeType)`
`static ByteBuffer` | `convertToDxt1NoTransparency(File file)`
`static ByteBuffer` | `convertToDxt1WithTransparency(ByteBuffer image, String mimeType)`
`static ByteBuffer` | `convertToDxt1WithTransparency(File file)`
`static ByteBuffer` | `convertToDxt3(ByteBuffer image, String mimeType)`
`static ByteBuffer` | `convertToDxt3(File file)`
`protected static int[]` | `determineExtremeColors(DDSConverter.Color[] colors)`
`protected static int[]` | `determineExtremeColors(DDSConverter.TransparentColor[] colors)`
`protected static int` | `distance(DDSConverter.Color ca, DDSConverter.Color cb)`
`protected static int` | `distance(DDSConverter.TransparentColor ca, DDSConverter.TransparentColor cb)`
`protected static void` | `equalTransparentCase(DDSConverter.TransparentColor[] colors, int[] extremaIndices, short value)`
`protected static DDSConverter.TransparentColor` | `generateColor5551(int pixel)`
`protected static DDSConverter.Color` | `getColor565(int pixel)`
`protected static DDSConverter.Color` | `getColor888(int r8g8b8)`
`protected static DDSConverter.TransparentColor[]` | `getColors5551(int[] pixels)`
`protected static DDSConverter.Color[]` | `getColors888(int[] pixels)`
`protected static int` | `getPixel565(DDSConverter.Color color)`
`protected static short` | `getShort5551(DDSConverter.TransparentColor color)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DDSConverter

    public DDSConverter()

Method Detail

### buildHeaderDxt1

    protected static void buildHeaderDxt1(ByteBuffer buffer,
                                          int width,
                                          int height)

### buildHeaderDxt3

    protected static void buildHeaderDxt3(ByteBuffer buffer,
                                          int width,
                                          int height)

### computeBitMask

    protected static long computeBitMask(DDSConverter.Color[] colors,
                                         int[] extremaIndices)

### computeBitMask

    protected static long computeBitMask(DDSConverter.TransparentColor[] colors,
                                         int[] extremaIndices)

### convertToDxt1NoTransparency

    public static ByteBuffer convertToDxt1NoTransparency(ByteBuffer image,
                                                         String mimeType)
                                                  throws IOException

  Parameters:
    `image` -
    `mimeType` -
  Returns:
  Throws:
    `IllegalArgumentException` - if either `image` or `mimeType` is null or if `mimeType` does not yield a valid suffix
    `IOException`

### convertToDxt1NoTransparency

    public static ByteBuffer convertToDxt1NoTransparency(File file)
                                                  throws IOException

  Parameters:
    `file` -
  Returns:
  Throws:
    `IllegalArgumentException` - if either `file` is null, does not exist, or cannot be read
    `IOException`

### convertToDxt1WithTransparency

    public static ByteBuffer convertToDxt1WithTransparency(ByteBuffer image,
                                                           String mimeType)
                                                    throws IOException

  Parameters:
    `image` -
    `mimeType` -
  Returns:
  Throws:
    `IllegalArgumentException` - if either `image` or `mimeType` is null, or if `mimeType` does not yield a valid suffix
    `IOException`

### convertToDxt1WithTransparency

    public static ByteBuffer convertToDxt1WithTransparency(File file)
                                                    throws IOException

  Parameters:
    `file` -
  Returns:
  Throws:
    `IllegalArgumentException` - if either `file` is null, does not exist, or cannot be read
    `IOException`

### convertToDxt3

    public static ByteBuffer convertToDxt3(ByteBuffer image,
                                           String mimeType)
                                    throws IOException

  Parameters:
    `image` -
    `mimeType` -
  Returns:
  Throws:
    `IllegalArgumentException` - if either `image` or `mimeType` is null, or if `mimeType` does not yield a valid suffix
    `IOException`

### convertToDxt3

    public static ByteBuffer convertToDxt3(File file)
                                    throws IOException

  Parameters:
    `file` -
  Returns:
  Throws:
    `IllegalArgumentException` - if either `file` is null, does not exist, or cannot be read
    `IOException`

### determineExtremeColors

    protected static int[] determineExtremeColors(DDSConverter.Color[] colors)

### determineExtremeColors

    protected static int[] determineExtremeColors(DDSConverter.TransparentColor[] colors)

### distance

    protected static int distance(DDSConverter.Color ca,
                                  DDSConverter.Color cb)

### distance

    protected static int distance(DDSConverter.TransparentColor ca,
                                  DDSConverter.TransparentColor cb)

### equalTransparentCase

    protected static void equalTransparentCase(DDSConverter.TransparentColor[] colors,
                                               int[] extremaIndices,
                                               short value)

### generateColor5551

    protected static DDSConverter.TransparentColor generateColor5551(int pixel)

### getColor565

    protected static DDSConverter.Color getColor565(int pixel)

### getColor888

    protected static DDSConverter.Color getColor888(int r8g8b8)

### getColors5551

    protected static DDSConverter.TransparentColor[] getColors5551(int[] pixels)

### getColors888

    protected static DDSConverter.Color[] getColors888(int[] pixels)

### getPixel565

    protected static int getPixel565(DDSConverter.Color color)

### getShort5551

    protected static short getShort5551(DDSConverter.TransparentColor color)

Overview | Package | Class | Use | Tree | Index | Help
| NASA World Wind
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD