-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add a basic DDS image plugin #1644
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
Conversation
|
Thanks for the contribution! Please could you include unit tests? (See here.) That way we can know it works on all Python versions and other operating systems, and to make sure it doesn't get broken in the future. |
|
@jleclanche Thanks for pushing this in as a PR. Quick set of reliability changes:
If you don't get to these, It's something that I'll get to at some point. |
PIL/DdsImagePlugin.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please name like DdsImageFile.
|
Did the easy bits. I'll probably leave it up to you for the rest @wiredfool if you don't mind... feeling a bit nauseated right now ;) |
Only supports DXT1 and DXT5 for now. The pixel formats ideally should be supported in decode.c instead, but for now this is good enough. Fixes #252
|
no worries |
|
@jleclanche Do you have some test images we can distribute under the PIL licence? |
|
@hugovk -- there are the ones here: http://code.qt.io/cgit/qt/qtimageformats.git/tree/tests/shared/images/dds?id=a4670f609c48fed61cbacf1a0a780ea27483ce18 But I think they're some form of gpl, either gplv2, or 3, or lgpl 2.1 or 3, or fdl. Which one, and if that's technically compatible with what we've got is above my pay grade. |
|
I've sent an email to ask if we can use them under the PIL licence. |
|
@wiredfool I got a almost complete set of test images you can use for this and for whatever for that matter. How would you like them. I have 50 saved in various dxt levels with a psd also used with the nvidia photoshop plugin to make them all. @jleclanche Thanks for your work on this! |
|
@Metallicow You attach a zip like archive here. |
|
@wiredfool Here ya go. |
|
See #1650 for this PR with added tests. |
|
Closing in favour of #1650 which contains my commit |
Only supports DXT1 and DXT5 for now.
The pixel formats ideally should be supported in decode.c instead,
but for now this is good enough.
Fixes #252