def read(fp, encoding):
    """ Reads image resources. """
    logger.debug("reading image resources..")

    resource_section_length = read_fmt("I", fp)[0]
    position = fp.tell()
    end_position = position + resource_section_length

    blocks = []
    while end_position < fp.tell():
        block = _read_block(fp, encoding)
        logger.debug("%r", block)
        blocks.append(block)

    return blocks
dataset/ETHPy150Open psd-tools/psd-tools/src/psd_tools/reader/image_resources.py/read/swapped operands of `<`