goldengnu / java-dds Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/java-dds
License: GNU General Public License v2.0
Automatically exported from code.google.com/p/java-dds
License: GNU General Public License v2.0
Not so much an issue, but a question. I have a decompressed unity asset bundle where I have raw image data in a byte array. I know the width, I know the height, I know it's DXT5, and I have the raw image data itself (it does not include any meta). How can I use this in this case? The only read method I saw in DDSImageReader was wanting an index and some other stuff, and I've no idea what that means in the context of my purely-image-data byte array.
What steps will reproduce the problem?
1.Create a thread that load a dds file
2.Launch multiple threads loading different images
What is the expected output? What do you see instead?
Expected : fully loaded images
Instead:
<code>
Exception in thread "Thread-9" java.lang.ArrayIndexOutOfBoundsException: 4
at net.nikr.dds.DDSLineReader.decodeDXT(DDSLineReader.java:182)
at net.nikr.dds.DDSLineReader.decodeLine(DDSLineReader.java:86)
at net.nikr.dds.DDSImageReader.read(DDSImageReader.java:280)
at javax.imageio.ImageIO.read(ImageIO.java:1448)
at javax.imageio.ImageIO.read(ImageIO.java:1308)
at lol.reader.img.Image.get(Image.java:37)
at lol.viewer.table.CellFactory$2$2.loadProcess(CellFactory.java:215)
at lol.viewer.table.CellFactory$2$2.loadProcess(CellFactory.java:1)
at lol.viewer.table.CellLoader$1.run(CellLoader.java:91)
at java.lang.Thread.run(Thread.java:722)
Exception in thread "Thread-11" java.lang.ArrayIndexOutOfBoundsException: 4096
at net.nikr.dds.DDSLineReader.decodeAtiAndDxt5AlphaBlock(DDSLineReader.java:330)
at net.nikr.dds.DDSLineReader.decodeDXT(DDSLineReader.java:172)
at net.nikr.dds.DDSLineReader.decodeLine(DDSLineReader.java:86)
at net.nikr.dds.DDSImageReader.read(DDSImageReader.java:280)
at javax.imageio.ImageIO.read(ImageIO.java:1448)
at javax.imageio.ImageIO.read(ImageIO.java:1308)
at lol.reader.img.Image.get(Image.java:37)
at lol.viewer.table.CellFactory$2$2.loadProcess(CellFactory.java:215)
at lol.viewer.table.CellFactory$2$2.loadProcess(CellFactory.java:1)
at lol.viewer.table.CellLoader$1.run(CellLoader.java:91)
at java.lang.Thread.run(Thread.java:722)
</code>
What version of the product are you using? On what operating system?
version used : HEAD on Win7 64
Please provide any additional information below.
The issue seems to be solved by changing variable declaration in DDSLineReader
from:
<code language="java">
private static byte[][][] linesColor;
private static int lineNumber = 0;
</code>
to:
<code language="java">
private byte[][][] linesColor;
private int lineNumber = 0;
</code>
Original issue reported on code.google.com by [email protected]
on 27 Jul 2013 at 7:00
A feature request.
Please upload this artifact to Maven Central (or to another big maven repo)
Makes automatic dependency managment much easier for this package.
Explaination on how to do so
http://kirang89.github.io/blog/2013/01/20/uploading-your-jar-to-maven-central/
(referenced in the first link)
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage
+Guide#SonatypeOSSMavenRepositoryUsageGuide-2.Signup
Original issue reported on code.google.com by [email protected]
on 28 Dec 2013 at 5:01
What steps will reproduce the problem?
1.Use case-sensitive file system
2.Try to build jar with maven
What is the expected output? What do you see instead?
All tests fail on a case-sensitive file system
with a file-not-found exception
What version of the product are you using? On what operating system?
Current version. An Ubuntu based distro.
Please provide any additional information below.
Solution:
The default file system is case-sensitive, in the code all all files have a
lowercase extension (.dds), some of the test files have an uppercase extension.
(.DDS)
(in src/test/resources/net/nikr/dds/)
For example ATI1N.DDS should be ATI1N.dds
Rename all .DDS files to .dds to solve this issue
The only other problem are the system-specific directory separators.
Windows uses a backslash, the rest a forward slash.
Use the constant "File.separator" for directory separators to avoid this
problem:
in DDSImageReaderTest.java
...
private class TestParams{
private final String pathSeparator = File.separator;
private final String dir = "src" + pathSeparator + "test" + pathSeparator + "resources" + pathSeparator + "net" + pathSeparator + "nikr" + pathSeparator + "dds" + pathSeparator;
...
After those corrections the project compiled
Original issue reported on code.google.com by [email protected]
on 28 Nov 2013 at 9:19
What steps will reproduce the problem?
1. Have a class with a method that successfully loads a PNG file
(ImageIO.read(URL/InputStream/etc)).
2. Add java-dds to classpath.
3. Attempt to execute the aforementioned method.
What is the expected output? What do you see instead?
Expected output: PNG is successfully read into an Image object.
Result: javax.imageio.IIOException: I/O error reading PNG header!
[...]
Caused by: javax.imageio.IIOException: Bad length for IHDR chunk!
What version of the product are you using? On what operating system?
SVN rev 16. Windows 7 Pro x86, Java 6u43 x86.
Please provide any additional information below.
I have attached a suggested fix for this issue.
Original issue reported on code.google.com by [email protected]
on 6 Mar 2013 at 5:06
Attachments:
The license text in your files states:
You should have received a copy of the GNU General Public License
along with Java DDS ImageIO Plugin; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
But no LICENSE file is included in the root of the repository.
Please add your license to your repo.
Original issue reported on code.google.com by [email protected]
on 28 Nov 2013 at 9:30
DXT5nm format is not read correct
Original issue reported on code.google.com by [email protected]
on 9 Feb 2014 at 3:37
What steps will reproduce the problem?
1.Use advanced code sample (see project front page) with attached image
test.dds(contains no mipmaps)
2.imageReader.getNumImages returns 0, should be 1 (is this correct?)
What version of the product are you using? On what operating system?
current version, Win 7, Java 7
Please provide any additional information below.
test.dds and test2.dds are identical, the only difference is that
test.dds has no mipmaps while test2.dds has 8
test.dds contains no mipmaps: GetNumImages should return 1
(256x256)
test.dds contains mipmaps: GetNumImages returns 9 (correct)
(256x256) (128x128) (64x64)
(32x32) (16x16) (8x8)
(4x4) (2x2) (1x1)
If the return statement is modified the correct image is returned:
if (imageIndex <= max) return imageReader.read(imageIndex);
(this of course is wrong, count starts from 0)
Using ImageIO.read directly works.
Original issue reported on code.google.com by [email protected]
on 28 Dec 2013 at 4:20
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.