--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/3a4148c0-3458-42c7-9023-608d87830b9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
can you provide a test dds with that compression. might be able to parse the data yourself form the binary directly
On Wed, May 20, 2015 at 11:44 AM, Benjam901 <benandr...@gmail.com> wrote:
Hello all,I am having a few troubles trying to load up a whole bunch of .dds files into python to check their size before downscale.I am batch downsizing them to test memory, normally using DXT5 compression wouldn't be a huge issue because various python image libraries can load them like Pyglet (which I am trying to use)However the issue I am having is that we are using the newer BC5 compression and it is rather new (so new in fact Maya won't load the images) and neither will the image library pyglet. This would indicate to me that there is little support for the image formats yet.I have tried to install PyFFI to test but it requires python 3.0 and devIL does not seem to have any solid documentation on how to use it.Has anyone worked with this image compression before and if so which library did you use to load the images?Cheers,Ben
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
ddsFile = open(filePath, 'rb')ddsFile.read(4) # Read the magicddsFile.read(8) # Skip 8 bytes inheight = struct.unpack('i', ddsFile.read(4))[0]width = struct.unpack('i', ddsFile.read(4))[0]
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/44604730-d6da-40d4-a535-fecfe4fbb993%40googlegroups.com.