Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docx/image/tiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ def _dpi(self, resolution_tag):
"""
if resolution_tag not in self._ifd_entries:
return 72

if TIFF_TAG.RESOLUTION_UNIT not in self._ifd_entries:
return 72

resolution_unit = self._ifd_entries[TIFF_TAG.RESOLUTION_UNIT]
if resolution_unit == 1: # aspect ratio only
return 72
Expand Down