git-svn-id: https://msi/svn/firstRepo/Service/branches/Manut_2.2.3@49 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
+23
@@ -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);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user