restricts the rows/columns range of a bitmap