git-svn-id: https://msi/svn/firstRepo/Service/branches/Manut_2.2.3@49 0f545695-f87b-41b6-9a03-7f16563b5454

This commit is contained in:
2016-01-15 17:04:16 +00:00
parent b371156b94
commit 0f64cd747d
22 changed files with 1942 additions and 113 deletions
+23
View File
@@ -1,5 +1,14 @@
<?php
if ( ! function_exists( 'exif_imagetype' ) ) {
function exif_imagetype ( $filename ) {
if ( ( list($width, $height, $type, $attr) = getimagesize( $filename ) ) !== false ) {
return $type;
}
return false;
}
}
function utf8json($inArray) {
if (is_array($inArray)) {
@@ -75,4 +84,18 @@ function getContentFromResources($res) {
return $contents;
}
function resizeImage($dropBoxObj, $layer, $size, $dir, $fileName, $dirDropBox)
{
$fullPath = $dir . "/" . $fileName;
$layer->resizeByLargestSideInPixel($size, true);
$layer->save($dir, $fileName);
try {
$dropBoxObj->CreateFolder($dirDropBox);
} catch (DropboxException $ex) {
}
$dropBoxObj->UploadFile($fullPath, $dirDropBox . "/" . $fileName);
}
?>