fn write_direntry<W: Write>(
    w: &mut W,
    width: u8,
    height: u8,
    color: ColorType,
    data_start: u32,
    data_size: u32
) -> Result<()>