class_docstr: Base class for image file format handlers.
class_docstr_tok: ["Base","class","for","image","file","format","handlers","."]
code: def load_prepare(self):
      # create image memory if necessary
      if (
          not self.im
          or self.im.mode != self.mode
          or self.im.size != self.size
      ):
          self.im = Image.core.new(self.mode, self.size)
      # create palette (optional)
      if self.mode == "P":
          Image.Image.load(self)
  
imports: import io
  import struct
  import sys
  from .None import Image
  from ._util import isPath
label_desc: Use image node_id 6 for calling the ImageFile obj's underlying member method code with example usage: obj.load_prepare() without return types