mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-05-21 00:00:01 -04:00
Basic wrapper around DDSReader.
Nasty hack to get initial plugin working... Mark and Reset the imageinput stream when reading the header. Then read the whole buffer into DDSReader and generate a fixed BufferedImage ignoring the getDestination() BufferedImage.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import com.twelvemonkeys.imageio.plugins.dds.DDSImageReader;
|
||||
import com.twelvemonkeys.imageio.plugins.dds.DDSImageReaderSpi;
|
||||
import com.twelvemonkeys.imageio.util.ImageReaderAbstractTest;
|
||||
|
||||
import javax.imageio.spi.ImageReaderSpi;
|
||||
import java.awt.Dimension;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class DDSImageTeaderTest extends ImageReaderAbstractTest<DDSImageReader> {
|
||||
@Override
|
||||
protected ImageReaderSpi createProvider() {
|
||||
return new DDSImageReaderSpi();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<TestData> getTestData() {
|
||||
return Collections.singletonList(
|
||||
new TestData(getClassLoaderResource("/dds/dxt5.dds"), new Dimension(512, 512))
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> getFormatNames() {
|
||||
return Arrays.asList("DDS", "dds");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> getSuffixes() {
|
||||
return Arrays.asList("dds");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> getMIMETypes() {
|
||||
return Collections.singletonList("image/vnd-ms.dds");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user