diff --git a/admin/admin.inc.php b/admin/admin.inc.php
index db21e86..f095468 100755
--- a/admin/admin.inc.php
+++ b/admin/admin.inc.php
@@ -274,12 +274,12 @@ if (isset($_POST['radio'])) {
-
-
+
+
-
-
+
+
-
+
diff --git a/application/function.php b/application/function.php
index 698a06b..ec1a880 100755
--- a/application/function.php
+++ b/application/function.php
@@ -113,7 +113,7 @@ function imgName()
return sha1(microtime());
break;
default:
- return base_convert(date('His') . mt_rand(1024, 10240), 10, 36); // 将上传时间+随机数转换为36进制 例:vx77yu
+ return base_convert(date('His') . mt_rand(1024, 9999), 10, 36); // 将上传时间+随机数转换为36进制 例:vx77yu
}
}
@@ -417,7 +417,7 @@ function imgRatio()
{
global $config;
if ($config['imgRatio']) {
-echo $config['imgRatio'];
+
if ($config['imgRatio_crop'] === 1) {
$imgRatio_crop = 'true';
} else {
@@ -430,10 +430,22 @@ echo $config['imgRatio'];
$imgRatio_preserve_headers = 'false';
}
+ if ($config['image_x'] != 0) {
+ $image_x = "width:" . $config['image_x'];
+ } else {
+ $image_x = null;
+ }
+
+ if ($config['image_y'] != 0) {
+ $image_y = "height:" . $config['image_y'];
+ } else {
+ $image_y = null;
+ }
+
return '
resize:{
- width: ' . $config['image_x'] . ',
- height: ' . $config['image_y'] . ',
+ ' . $image_x . ',
+ ' . $image_y . ',
crop: ' . $imgRatio_crop . ',
quality:' . $config['imgRatio_quality'] . ',
preserve_headers: ' . $imgRatio_preserve_headers . ',
@@ -662,12 +674,13 @@ function writefile($filename, $writetext, $openmod = 'w')
}
}
-function get_online_thumbnail($imgUrl){
+function get_online_thumbnail($imgUrl)
+{
global $config;
- if($config['thumbnail']){
+ if ($config['thumbnail']) {
$imgUrl = str_replace($config['imgurl'], '', $imgUrl);
- return $config['domain'].'/application/thumb.php?img='.$imgUrl.'&width=300&height=300';
- }else{
+ return $config['domain'] . '/application/thumb.php?img=' . $imgUrl . '&width=300&height=300';
+ } else {
return $imgUrl;
}
-}
\ No newline at end of file
+}
diff --git a/config/config.php b/config/config.php
index 3b7e752..2ab2a96 100755
--- a/config/config.php
+++ b/config/config.php
@@ -30,10 +30,10 @@ $config=Array
'minWidth'=>5,
'minHeight'=>5,
'imgRatio'=>0,
- 'image_x'=>800,
- 'image_y'=>800,
- 'imgRatio_quality'=>60,
- 'imgRatio_crop'=>1,
+ 'image_x'=>2500,
+ 'image_y'=>2700,
+ 'imgRatio_quality'=>80,
+ 'imgRatio_crop'=>0,
'imgRatio_preserve_headers'=>1,
'static_cdn'=>0,
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0',
diff --git a/public/images/image_icon_153794.png b/public/images/image_icon_153794.png
new file mode 100755
index 0000000..cd002c5
Binary files /dev/null and b/public/images/image_icon_153794.png differ