Skip to content

Commit

Permalink
Merge branch 'main' into build1518
Browse files Browse the repository at this point in the history
# Conflicts:
#	main.spec
  • Loading branch information
leslievan committed Aug 4, 2023
2 parents 9506901 + cc734a7 commit 7560664
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion entity/image_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,9 @@ def save(self, target_path, quality=100):

if self.watermark_img.mode != 'RGB':
self.watermark_img = self.watermark_img.convert('RGB')
self.watermark_img.save(target_path, quality=quality, encoding='utf-8', exif=self.img.info['exif'])

if 'exif' in self.img.info:
self.watermark_img.save(target_path, quality=quality, encoding='utf-8',
exif=self.img.info['exif'] if 'exif' in self.img.info else '')
else:
self.watermark_img.save(target_path, quality=quality, encoding='utf-8')

0 comments on commit 7560664

Please sign in to comment.