def METHOD_NAME(self):
    # header
    s = self.fp.read(128)
    if not _accept(s):
        raise SyntaxError("not a PCX file")
    # image
    bbox = i16(s, 4), i16(s, 6), i16(s, 8) + 1, i16(s, 10) + 1
    if bbox[2] <= bbox[0] or bbox[3] <= bbox[1]:
        raise SyntaxError("bad PCX image size")
    logger.debug("BBox: %s %s %s %s", *bbox)
    # format
    version = i8(s[1])
    bits = i8(s[3])
    planes = i8(s[65])
    stride = i16(s, 66)
    logger.debug(
        "PCX version %s, bits %s, planes %s, stride %s",
        version,
        bits,
        planes,
        stride,
    )
    self.info["dpi"] = i16(s, 12), i16(s, 14)
    if bits == 1 and planes == 1:
        mode = rawmode = "1"
    elif bits == 1 and planes in (2, 4):
        mode = "P"
        rawmode = "P;%dL" % planes
        self.palette = ImagePalette.raw("RGB", s[16:64])
    elif version == 5 and bits == 8 and planes == 1:
        mode = rawmode = "L"
        # FIXME: hey, this doesn't work with the incremental loader !!!
        self.fp.seek(-769, io.SEEK_END)
        s = self.fp.read(769)
        if len(s) == 769 and i8(s[0]) == 12:
            # check if the palette is linear greyscale
            for i in range(256):
                if s[i * 3 + 1 : i * 3 + 4] != o8(i) * 3:
                    mode = rawmode = "P"
                    break
            if mode == "P":
                self.palette = ImagePalette.raw("RGB", s[1:])
        self.fp.seek(128)
    elif version == 5 and bits == 8 and planes == 3:
        mode = "RGB"
        rawmode = "RGB;L"
    else:
        raise IOError("unknown PCX mode")
    self.mode = mode
    self._size = bbox[2] - bbox[0], bbox[3] - bbox[1]
    bbox = (0, 0) + self.size
    logger.debug("size: %sx%s", *self.size)
    self.tile = [("pcx", bbox, self.fp.tell(), (rawmode, planes * stride))]