mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Removed camelcase
This commit is contained in:
parent
64910d1921
commit
259a2ce2b2
|
@ -751,7 +751,7 @@ class Exif(MutableMapping):
|
|||
self._data[0x8825] = ifd
|
||||
self._ifds[0x8825] = ifd
|
||||
|
||||
def toBytes(self, offset=0):
|
||||
def tobytes(self, offset=0):
|
||||
from . import TiffImagePlugin
|
||||
if self.endian == "<":
|
||||
head = b"II\x2A\x00\x08\x00\x00\x00"
|
||||
|
@ -760,7 +760,7 @@ class Exif(MutableMapping):
|
|||
ifd = TiffImagePlugin.ImageFileDirectory_v2(ifh=head)
|
||||
for tag, value in self._data.items():
|
||||
ifd[tag] = value
|
||||
return b"Exif\x00\x00"+head+ifd.toBytes(offset)
|
||||
return b"Exif\x00\x00"+head+ifd.tobytes(offset)
|
||||
|
||||
def get_ifd(self, tag):
|
||||
if tag not in self._ifds and tag in self._data:
|
||||
|
|
|
@ -726,7 +726,7 @@ def _save(im, fp, filename):
|
|||
|
||||
exif = info.get("exif", b"")
|
||||
if isinstance(exif, ImageFile.Exif):
|
||||
exif = exif.toBytes()
|
||||
exif = exif.tobytes()
|
||||
|
||||
# get keyword arguments
|
||||
im.encoderconfig = (
|
||||
|
|
|
@ -887,7 +887,7 @@ def _save(im, fp, filename, chunk=putchunk):
|
|||
exif = im.encoderinfo.get("exif", im.info.get("exif"))
|
||||
if exif:
|
||||
if isinstance(exif, ImageFile.Exif):
|
||||
exif = exif.toBytes(8)
|
||||
exif = exif.tobytes(8)
|
||||
if exif.startswith(b"Exif\x00\x00"):
|
||||
exif = exif[6:]
|
||||
chunk(fp, b"eXIf", exif)
|
||||
|
|
|
@ -785,7 +785,7 @@ class ImageFileDirectory_v2(MutableMapping):
|
|||
warnings.warn(str(msg))
|
||||
return
|
||||
|
||||
def toBytes(self, offset=0):
|
||||
def tobytes(self, offset=0):
|
||||
# FIXME What about tagdata?
|
||||
result = self._pack("H", len(self._tags_v2))
|
||||
|
||||
|
@ -859,7 +859,7 @@ class ImageFileDirectory_v2(MutableMapping):
|
|||
fp.write(self._prefix + self._pack("HL", 42, 8))
|
||||
|
||||
offset = fp.tell()
|
||||
result = self.toBytes(offset)
|
||||
result = self.tobytes(offset)
|
||||
fp.write(result)
|
||||
return offset + len(result)
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ def _save_all(im, fp, filename):
|
|||
icc_profile = im.encoderinfo.get("icc_profile", "")
|
||||
exif = im.encoderinfo.get("exif", "")
|
||||
if isinstance(exif, ImageFile.Exif):
|
||||
exif = exif.toBytes()
|
||||
exif = exif.tobytes()
|
||||
xmp = im.encoderinfo.get("xmp", "")
|
||||
if allow_mixed:
|
||||
lossless = False
|
||||
|
@ -319,7 +319,7 @@ def _save(im, fp, filename):
|
|||
icc_profile = im.encoderinfo.get("icc_profile", "")
|
||||
exif = im.encoderinfo.get("exif", "")
|
||||
if isinstance(exif, ImageFile.Exif):
|
||||
exif = exif.toBytes()
|
||||
exif = exif.tobytes()
|
||||
xmp = im.encoderinfo.get("xmp", "")
|
||||
|
||||
if im.mode not in _VALID_WEBP_LEGACY_MODES:
|
||||
|
|
Loading…
Reference in New Issue
Block a user