MCPcopy Index your code
hub / github.com/python-pillow/Pillow / decode

Method decode

src/PIL/ImageFile.py:839–849  ·  view source on GitHub ↗

Override to perform the decoding process. :param buffer: A bytes object with the data to be decoded. :returns: A tuple of ``(bytes consumed, errcode)``. If finished with decoding return -1 for the bytes consumed. Err codes are from :data:`.ImageFile.

(self, buffer: Image.DecoderInput)

Source from the content-addressed store, hash-verified

837 return self._pulls_fd
838
839 def decode(self, buffer: Image.DecoderInput) -> tuple[int, int]:
840 """
841 Override to perform the decoding process.
842
843 :param buffer: A bytes object with the data to be decoded.
844 :returns: A tuple of ``(bytes consumed, errcode)``.
845 If finished with decoding return -1 for the bytes consumed.
846 Err codes are from :data:`.ImageFile.ERRORS`.
847 """
848 msg = "unavailable in base decoder"
849 raise NotImplementedError(msg)
850
851 def set_as_raw(
852 self,

Callers 15

test_decodeMethod · 0.95
_pkg_configFunction · 0.45
get_macos_sdk_pathMethod · 0.45
get_ios_sdk_pathMethod · 0.45
build_extensionsMethod · 0.45
grabclipboardFunction · 0.45
__init__Method · 0.45
_openMethod · 0.45
_saveFunction · 0.45
loadMethod · 0.45
feedMethod · 0.45
set_as_rawMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_decodeMethod · 0.76