private void setPixelFormat(int dxgiFormat) throws IOException {
        switch(dxgiFormat) {
            case DXGIFormat.DXGI_FORMAT_UNKNOWN:
                pixelFormat = Format.ETC1;
                break;
            case DXGIFormat.DXGI_FORMAT_BC1_UNORM:
                pixelFormat = Format.DXT1;
                break;
            case DXGIFormat.DXGI_FORMAT_BC2_UNORM:
                pixelFormat = Format.DXT3;
                break;
            case DXGIFormat.DXGI_FORMAT_BC3_UNORM:
                pixelFormat = Format.DXT5;
                break;
            case DXGIFormat.DXGI_FORMAT_BC4_UNORM:
                pixelFormat = Image.Format.RGTC1;
                break;
            case DXGIFormat.DXGI_FORMAT_BC4_SNORM:
                pixelFormat = Format.SIGNED_RGTC1;
                break;
            case DXGIFormat.DXGI_FORMAT_BC5_UNORM:
                pixelFormat = Image.Format.RGTC2;
                break;
            case DXGIFormat.DXGI_FORMAT_BC5_SNORM:
                pixelFormat = Image.Format.SIGNED_RGTC2;
                break;
            case DXGIFormat.DXGI_FORMAT_BC6H_UF16:
                pixelFormat = Format.BC6H_UF16;
                break;
            case DXGIFormat.DXGI_FORMAT_BC6H_SF16:
                pixelFormat = Format.BC6H_SF16;
                break;
            case DXGIFormat.DXGI_FORMAT_BC7_UNORM:
                pixelFormat = Format.BC7_UNORM;
                break;
            case DXGIFormat.DXGI_FORMAT_BC7_UNORM_SRGB:
                pixelFormat = Format.BC7_UNORM_SRGB;
                break;
            default:
                throw new IOException("Unsupported DX10 format: " + dxgiFormat);
        }
        
        bpp = DXGIFormat.getBitsPerPixel(dxgiFormat);
    }
<code>DDSLoader</code> is an image loader that reads in a DirectX DDS file.
Supports DXT1, DXT3, DXT5, RGB, RGBA, Grayscale, Alpha pixel formats.
2D images, mipmapped 2D images, and cubemaps.

@author Gareth Jenkins-Jones
@author Kirill Vainer
@version $Id: DDSLoader.java,v 2.0 2008/8/15
jme3-core/src/plugins/java/com/jme3/texture/plugins/DDSLoader.java