data.rewind();
final ImageDataFormat fmt = useAlpha ? ImageDataFormat.RGBA : ImageDataFormat.RGB;
final Image image = new Image(fmt, PixelDataType.UnsignedByte, atlasWidth, atlasHeight, data, null);
final TextureStoreFormat format = atlasTextureParameter.compress ? TextureStoreFormat.GuessCompressedFormat
: TextureStoreFormat.GuessNoCompressedFormat;
final Texture texture = TextureManager.loadFromImage(image, atlasTextureParameter.minificationFilter,
format);
texture.setMagnificationFilter(atlasTextureParameter.magnificationFilter);