dbremner / crunch

Automatically exported from code.google.com/p/crunch
Other
0 stars 0 forks source link

.dds ARGB8888 files are not being read. #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Running the following:

crunch -file btn_colony.dds -fileformat dds -A8R8G8B8 -out test.dds -mipMode 
None

on the attached file results in the following error:

crunch: Advanced DXTn Texture Compressor - http://code.google.com/p/crunch      

Copyright (c) 2010-2012 Rich Geldreich and Tenacious Software LLC               

crnlib version v1.01 x86 Built Apr 15 2012, 18:14:02                            

Reading source texture: "btn_colony.dds"            
Error: Failed reading source file: "btn_colony.dds" 

Original issue reported on code.google.com by christia...@gmail.com on 25 Jul 2012 at 6:55

Attachments:

GoogleCodeExporter commented 9 years ago
I've reproduced this in the latest (development) version. crnlib's DDS reader 
is in dds_texture::read_dds_internal(). It looks like this function is failing 
to handle non-DXTc files which use dwLinearSize vs. lPitch:

        dwSize  124 unsigned int
        dwFlags 528391  unsigned int
        dwHeight    52  unsigned int
        dwWidth 52  unsigned int
        lPitch  10816   int
        dwLinearSize    10816   unsigned int

dwFlags is 0x00081007, and DDSD_LINEARSIZE is 0x00080000, but lPitch and 
dwLinearSize are unioned.

The fix should be pretty easy. I'll fix the latest development version first. 
Thanks a bunch for the report.

Original comment by richge...@gmail.com on 11 Aug 2012 at 8:01

GoogleCodeExporter commented 9 years ago
Just grabbed the source using svn and it seems this bug has not been fixed, 
should I expect it to be fixed?

Original comment by christia...@gmail.com on 24 Oct 2012 at 12:03

GoogleCodeExporter commented 9 years ago
Hi Christian - Yes, I've fixed this in my local development branch. Apologies 
for the delay, I've been pretty slammed with other projects, so I haven't had 
much time to work on crunch a whole lot. I'll try to release my current devel 
version to a branch in SVN within the week.

Original comment by richge...@gmail.com on 24 Oct 2012 at 4:42

GoogleCodeExporter commented 9 years ago
Or you could zip it up and dropbox it for me...

Original comment by christia...@gmail.com on 24 Oct 2012 at 5:21

GoogleCodeExporter commented 9 years ago
I've checked the latest code into SVN. This problem is hopefully fixed.

Original comment by richge...@gmail.com on 25 Nov 2012 at 9:01