I found a php script that saves pictures. Android application refers to a web script when rendering an image. However, images are stored rotated by 90. Do not you know what to add to php script to turn the image to the right side?
php code
if (!empty($_POST)) {
$accountId = isset($_POST['accountId']) ? $_POST['accountId'] : '';
$accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
$auth = new auth($dbo);
if (!$auth->authorize($accountId, $accessToken)) {
api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
}
if (isset($_FILES['uploaded_file']['name'])) {
$currentTime = time();
$uploaded_file_ext = @pathinfo($_FILES['uploaded_file']['name'], PATHINFO_EXTENSION);
if (@move_uploaded_file($_FILES['uploaded_file']['tmp_name'], "../../".TEMP_PATH."{$currentTime}.".$uploaded_file_ext)) {
$response = array();
$imgLib = new imglib($dbo);
$response = $imgLib->createMyPhoto("../../".TEMP_PATH."{$currentTime}.".$uploaded_file_ext);
if ($response['error'] === false) {
$result = array("error" => false,
"originPhotoUrl" => $response['originPhotoUrl'],
"normalPhotoUrl" => $response['normalPhotoUrl'],
"previewPhotoUrl" => $response['previewPhotoUrl']);
}
unset($imgLib);
}
}
echo json_encode($result);
exit;
}
thanks for help