这是我到目前为止所拥有的:
public static Photograph rotated(Photograph photo) {
    Photograph rotated_copy = new Photograph(photo.getHeight(), photo.getWidth());
    Pixel starting_pixel = photo.getPixel(0,0);
    for(int col = 0; col < photo.getWidth(); col++){
        for(int row = 0; row < photo.getHeight(); row++){
            starting_pixel = photo.getPixel(col,row);
            rotated_copy.setPixel(row, col, starting_pixel);
        }
    }
    return rotated_copy;
}
但是,此方法会将拍摄的任何照片逆时针旋转 90 度。我怎样才能解决这个问题?