My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 5: imageReader.getNumImages returns 0 on dds with no mipmaps
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  nikla...@gmail.com
Closed:  Dec 2013


 
Reported by the0xF...@gmail.com, Dec 28, 2013
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.
test.dds
64.1 KB   Download
test2.dds
85.5 KB   Download
Dec 28, 2013
Project Member #1 nikla...@gmail.com
I can reproduce the problem.

Reason for bug:
The MIPMAP flag is not set in test.dds

Resolved with:
If mipmap <= 0: return 1

Completed in r22

Status: Fixed
Owner: nikla...@gmail.com
Dec 28, 2013
#2 the0xF...@gmail.com
Was it malformed? (like not working?)

The files were generated with the official plugin from NVidia for Photoshop.

Dec 28, 2013
#3 the0xF...@gmail.com
it ==> the two files attached in the first post.

Thanks for the fast support btw.
Dec 28, 2013
Project Member #4 nikla...@gmail.com
No, It's not malformed, it's 100% valid AFAIK. It just din't have the MIPMAP flag (which I never accounted for, when I wrote the code).

I added the files to SVN, so they are included in all future tests.

And thank you for all your bug reports, it would not have been fixed without you...

Powered by Google Project Hosting