Implemented linear partitioning of photos