Photo upload rotate function works on canvas