diff --git a/src/PIL/IcnsImagePlugin.py b/src/PIL/IcnsImagePlugin.py index 963ad199e..e3b274295 100644 --- a/src/PIL/IcnsImagePlugin.py +++ b/src/PIL/IcnsImagePlugin.py @@ -300,12 +300,12 @@ class IcnsImageFile(ImageFile.ImageFile): self.load_end() -def to_int(s): +def _to_int(s): b = s.encode("ascii") return (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | b[3] -MAGIC = to_int("icns") +MAGIC = _to_int("icns") HEADER_SIZE = 8 TOC = "TOC " @@ -341,15 +341,15 @@ def _save(im, fp, filename): # TOC toc_size = HEADER_SIZE + (len(entries) * HEADER_SIZE) - fp.write(struct.pack("