Implemented linear partition and img resizing