Format Preservation with minimal alterations #135
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds the ability to preserve the file type of the image being converted into a thumbnail depending on the boolean settings.THUMBNAIL_PRESERVE_FORMAT, which is set to False by default.
This pull request gracefully degrades and defaults to using settings.THUMBNAIL_FORMAT. Applications that currently use sorl should not notice any difference in functionality unless settings.THUMBNAIL_PRESERVE_FORMAT is set explicitly set to True.
This pull request is desirable for anyone developing a medium scale application that relies on sorl, as the dilemma of preserving transparent PNGs as PNGs while optimizing JPGs arises quickly. I have several colleagues who have written this functionality into their application or have created their own backend to handle this case; I feel this is basic functionality that should be included in the sorl repo.
Thank You and Best Regards,
~pygeek