Skip to content
Merged
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
8 changes: 5 additions & 3 deletions src/async_geotiff/_geotiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

from affine import Affine
from async_tiff import TIFF
from async_tiff.enums import PhotometricInterpretation

from async_geotiff._overview import Overview
from async_geotiff.enums import Compression, Interleaving, PhotometricInterp
from async_geotiff.enums import Compression, Interleaving

if TYPE_CHECKING:
import pyproj
Expand Down Expand Up @@ -383,8 +384,9 @@ def is_mask_ifd(ifd: ImageFileDirectory) -> bool:
"""Check if an IFD is a mask IFD."""
if (
ifd.compression == Compression.deflate
and ifd.new_subfile_type
and ifd.photometric_interpretation == 4
and ifd.new_subfile_type is not None
and ifd.new_subfile_type & 4 != 0
and ifd.photometric_interpretation == PhotometricInterpretation.TransparencyMask
):
return True

Expand Down
Loading