Skip to content

Commit

Permalink
Merge pull request #47 from gbts/master
Browse files Browse the repository at this point in the history
Adds ICC profile preservation in preprocess_image
  • Loading branch information
respondcreate committed Apr 15, 2016
2 parents a1f5ad8 + e64caeb commit ee57a91
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions versatileimagefield/datastructures/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def preprocess(self, image, image_format):
elif orientation == 8:
image = image.transpose(Image.ROTATE_90)

# Ensure any embedded ICC profile is preserved
save_kwargs['icc_profile'] = image.info.get('icc_profile')

if hasattr(self, 'preprocess_%s' % image_format):
image, addl_save_kwargs = getattr(
self,
Expand Down

0 comments on commit ee57a91

Please sign in to comment.