mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-05-28 00:00:03 -04:00
Format tabs -> 4 spaces
This commit is contained in:
+2
-2
@@ -31,14 +31,14 @@ public final class DDSHeader {
|
|||||||
byte[] magic = new byte[DDS.MAGIC.length];
|
byte[] magic = new byte[DDS.MAGIC.length];
|
||||||
imageInput.readFully(magic);
|
imageInput.readFully(magic);
|
||||||
if (!Arrays.equals(DDS.MAGIC, magic)) {
|
if (!Arrays.equals(DDS.MAGIC, magic)) {
|
||||||
throw new IIOException(String.format("Not a DDS file. Expected DDS magic %02x, read %02x", DDS.MAGIC, magic));
|
throw new IIOException(String.format("Not a DDS file. Expected DDS magic %02x, read %02x", Arrays.toString(DDS.MAGIC), magic));
|
||||||
}
|
}
|
||||||
|
|
||||||
// DDS_HEADER structure
|
// DDS_HEADER structure
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dds-header
|
// https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dds-header
|
||||||
int dwSize = imageInput.readInt(); // [4,7]
|
int dwSize = imageInput.readInt(); // [4,7]
|
||||||
if (dwSize != DDS.HEADER_SIZE) {
|
if (dwSize != DDS.HEADER_SIZE) {
|
||||||
throw new IIOException(String.format("Invalid DDS header size (expected %d): %d", DDS.HEADER_SIZE, dwSize);
|
throw new IIOException(String.format("Invalid DDS header size (expected %d): %d", DDS.HEADER_SIZE, dwSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify flags
|
// Verify flags
|
||||||
|
|||||||
+3
-3
@@ -6,9 +6,9 @@ final class DDSProviderInfo extends ReaderWriterProviderInfo {
|
|||||||
DDSProviderInfo() {
|
DDSProviderInfo() {
|
||||||
super(
|
super(
|
||||||
DDSProviderInfo.class,
|
DDSProviderInfo.class,
|
||||||
new String[] {"DDS", "dds"},
|
new String[]{"DDS", "dds"},
|
||||||
new String[] {"dds"},
|
new String[]{"dds"},
|
||||||
new String[] {"image/vnd-ms.dds"},
|
new String[]{"image/vnd-ms.dds"},
|
||||||
"com.twelvemonkeys.imageio.plugins.dds.DDSImageReader",
|
"com.twelvemonkeys.imageio.plugins.dds.DDSImageReader",
|
||||||
new String[]{"com.twelvemonkeys.imageio.plugins.dds.DDSImageReaderSpi"},
|
new String[]{"com.twelvemonkeys.imageio.plugins.dds.DDSImageReaderSpi"},
|
||||||
null,
|
null,
|
||||||
|
|||||||
+3
-5
@@ -30,16 +30,15 @@
|
|||||||
|
|
||||||
package com.twelvemonkeys.imageio.reference;
|
package com.twelvemonkeys.imageio.reference;
|
||||||
|
|
||||||
|
import com.sun.imageio.plugins.png.PNGImageReader;
|
||||||
import com.twelvemonkeys.imageio.util.IIOUtil;
|
import com.twelvemonkeys.imageio.util.IIOUtil;
|
||||||
import com.twelvemonkeys.imageio.util.ImageReaderAbstractTest;
|
import com.twelvemonkeys.imageio.util.ImageReaderAbstractTest;
|
||||||
|
|
||||||
import com.sun.imageio.plugins.png.PNGImageReader;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import javax.imageio.IIOException;
|
import javax.imageio.IIOException;
|
||||||
import javax.imageio.spi.IIORegistry;
|
import javax.imageio.spi.IIORegistry;
|
||||||
import javax.imageio.spi.ImageReaderSpi;
|
import javax.imageio.spi.ImageReaderSpi;
|
||||||
import java.awt.*;
|
import java.awt.Dimension;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -86,8 +85,7 @@ public class PNGImageReaderTest extends ImageReaderAbstractTest<PNGImageReader>
|
|||||||
public void testSetDestinationTypeIllegal() throws IOException {
|
public void testSetDestinationTypeIllegal() throws IOException {
|
||||||
try {
|
try {
|
||||||
super.testSetDestinationTypeIllegal();
|
super.testSetDestinationTypeIllegal();
|
||||||
}
|
} catch (IIOException expected) {
|
||||||
catch (IIOException expected) {
|
|
||||||
// Known bug
|
// Known bug
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user