-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request DDSImagePlugin #252
Comments
Sure, next step would be to send a pull request if you are able to |
I haven't written anything. Just found some code that works with dxt1 floating around the net. Niftools / blender plugin Nvidia tools might help also. |
No worries, I only suggest you do it because that would increase the chances of it getting done. Otherwise we have to wait for @wiredfool or @d-schmidt to take an interest (which may or may not happen soon, or ever). In any event, thanks for making the request; we now have a record of it, at least |
An interest huh... Haha |
@Metallicow Tee hee hee! |
@aclark4life, could you reopen this feature request? |
Thanks. ;) |
That dds code's mine actually, from an experimental PIL fork before Pillow existed. A dds plugin would be really nice, eg. right now I need to load DXT1 / DXT5 data into Pillow so I have to write my own decoder again =\ |
@jleclanche Great! So no issue incorporating your dds code into Pillow? I see you are right, pilgrim was born almost a full year before Pillow (2009-11-26 vs 2010-07-31). Interesting. |
@aclark4life I'm writing an updated version right now which I'm testing against files from .unity3d packing. What license do you want it under? |
@jleclanche Great & good question. We use the same license is PIL, in case that helps you decide: https://github.com/python-pillow/Pillow/blob/master/LICENSE |
@aclark4life ok I'll re-release the decoders as CC0 to make things simpler. Are you in the #pil channel? I might need some help with writing the plugin. |
@jleclanche Yes but you may need @wiredfool or other members of the @python-pillow/pillow-team to weigh in on "real" programming questions. For the @python-pillow/pillow-team , here's some IRC discussion about this issue: http://chat-logs.dcpython.org/day/pil/2016-01-04 |
Here's a dxt1 decoder, licensed CC0. It's pretty slow and will need to be rewritten in C but it's usable. DDS is a container format for s3tc and all the defines are in that file. This is a very old loader for dds (please don't use it), which should give an idea of how to write one. I won't be filing a PR or anything, unfortunately I don't have time for that; I licensed it so that anyone may use it without having to worry about the license itself :) By the way in that old project I also have an ftex (IW2 format) decoder lying around.. wouldn't mind making that CC0 as well if someone wants to push it to pillow. |
Updated link with a DXT5 decoder too: |
OK this is actually crazy. I try to write a simple read-only DDS plugin, looks like the API has changed since PIL - fair enough. I spend four hours trying to figure out the API. I still haven't figured it out as I write this. And none of this is properly documented. I'm in Please please find some time to work on proper documentation on how to write an image plugin for a custom format and to clean up the image plugins. |
@jleclanche I doubt much has changed since PIL, but if it has: you don't need to fork Pillow to fix it you can just fix it (send a PR). Rather than folks maintaining separate forks, we maintain one then release results to PyPI. |
@aclark4life I fixed it eventually with @wiredfool's help. I'll send a PR. Honestly there really needs to be a new plugin API, this was very painful. |
I would like to request the .dds(direct draw surface) format be decoded and added as an image plugin. I guess this is the right place for requests...?
I found this as a start. It doesn't do all dxt formats but some basic ones.
http://nullege.com/codes/show/src%40p%40i%40pilgrim-HEAD%40pilgrim%40codecs%40__init__.py/9/dds.DDS/python
The text was updated successfully, but these errors were encountered: