diff --git a/src/PIL/DdsImagePlugin.py b/src/PIL/DdsImagePlugin.py index 30f021b7dc5..407d33d8512 100644 --- a/src/PIL/DdsImagePlugin.py +++ b/src/PIL/DdsImagePlugin.py @@ -379,7 +379,7 @@ def _open(self): self._mode = "P" self.palette = ImagePalette.raw("RGBA", self.fp.read(1024)) elif pfflags & DDPF.FOURCC: - data_offs = header_size + 4 + offset = header_size + 4 if fourcc == D3DFMT.DXT1: self._mode = "RGBA" self.pixel_format = "DXT1" @@ -405,7 +405,7 @@ def _open(self): self.pixel_format = "BC5" n = 5 elif fourcc == D3DFMT.DX10: - data_offs += 20 + offset += 20 # ignoring flags which pertain to volume textures and cubemaps (dxgi_format,) = struct.unpack("