Commit Graph

8 Commits

Author SHA1 Message Date
Paul Allen dede5eabb5 Use Enum DDSType instead of int values.
Pass imageIndex into mipmap.
2024-09-19 19:03:33 +01:00
Paul Allen 7eb45b1245 Code cleanup and added exception handling. 2024-09-19 13:43:27 +01:00
Paul Allen 79aef6e14a Remove offset and use imageInput.readFully
Reads next image calculating/updating width/height from mipmapLevel.
Probably will never get used as we only want the largest image returned.
2024-09-18 16:57:56 +01:00
Paul Allen 7082a5310f Added processImageStarted and stubbed out processImageProgress and processReadAborted
Added all DDS format test cases to getTestData
2024-09-17 16:57:54 +01:00
Paul Allen 0cd056ac54 Push ImageInputStream into DDSReader
Unable to determine buffer length (so as a hack I over allocate buffer and read)

```
byte[] buffer = new byte[width * height * 4];
int len = imageInput.read(buffer);
```

Added test files for all supported formats.
2024-09-17 16:37:11 +01:00
Paul Allen 120d6eba54 Fix pixel order to ARGB 2024-09-16 17:29:35 +01:00
Paul Allen ec7635d7d8 Read header (DDSHeader) and pass into DDSReader
Remove header methods using buffer offset addressing.
Switch endian for DX1-DX5 types
2024-09-16 17:28:56 +01:00
Paul Allen 82bf4851ab 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.
2024-09-13 15:51:00 +01:00