X-Git-Url: http://git.dj3c1t.com/index.cgi?a=blobdiff_plain;f=mw%2Fapp%2Fdata%2Fmodules%2Fshare%2Fmw_data_images.php;fp=mw%2Fapp%2Fdata%2Fmodules%2Fshare%2Fmw_data_images.php;h=c540972855e99010e9425167bb6c46eb6a5b74fa;hb=36ed114046cbe3d72a3589230e9f306a54fcc79d;hp=0000000000000000000000000000000000000000;hpb=281c96e95451269f2614684b8de5be25862c8374;p=mtweb diff --git a/mw/app/data/modules/share/mw_data_images.php b/mw/app/data/modules/share/mw_data_images.php new file mode 100644 index 0000000..c540972 --- /dev/null +++ b/mw/app/data/modules/share/mw_data_images.php @@ -0,0 +1,27 @@ + $max_width || $img_infos[1] > $max_height){ + $r = $max_width / $img_infos[0]; + if($r * $img_infos[1] > $max_height) $r = $max_height / $img_infos[1]; + return array( + "width" => floor($r * $img_infos[0]), + "height" => floor($r * $img_infos[1]) + ); + } + return array( + "width" => $img_infos[0], + "height" => $img_infos[1] + ); + } + return false; + } + + } + +?> \ No newline at end of file