This commit has been accessed 776 times via Git panel.
commit cde652ed93d7b16e00c65642bc83a7243fd0c9f1
tree 7e28eed07e22e2eaac8de61ada8cdeecbe1c7c49
parent 35ba66b74bba3f0328e415893cde1fa57752288c
author Magie Antonio <magie@majcms.org> 1371895777 +0800
committer Magie Antonio <magie@majcms.org> 1371895777 +0800
Fix incorrect imagegif and imagepng quality
diff --git a/core.php b/core.php
index dc65757..dd65b9b 100644
--- a/core.php
+++ b/core.php
@@ -438,7 +438,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
unlink("$maj_image_directory/avatar.gif");
- imagegif($avatar_gif_image_resize,"$maj_image_directory/avatar.gif",100);
+ imagegif($avatar_gif_image_resize,"$maj_image_directory/avatar.gif");
imagedestroy($avatar_gif_image_resize);
imagedestroy($avatar_gif_image_original);
@@ -502,7 +502,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
unlink("$maj_image_directory/avatar.png");
- imagepng($avatar_png_image_resize,"$maj_image_directory/avatar.png",100);
+ imagepng($avatar_png_image_resize,"$maj_image_directory/avatar.png",9);
imagedestroy($avatar_png_image_resize);
imagedestroy($avatar_png_image_original);
@@ -548,7 +548,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
unlink("$maj_image_directory/members/$author_username/avatar.gif");
- imagegif($avatar_gif_image_resize,"$maj_image_directory/members/$author_username/avatar.gif",100);
+ imagegif($avatar_gif_image_resize,"$maj_image_directory/members/$author_username/avatar.gif");
imagedestroy($avatar_gif_image_resize);
imagedestroy($avatar_gif_image_original);
@@ -611,7 +611,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
unlink("$maj_image_directory/members/$author_username/avatar.png");
- imagepng($avatar_png_image_resize,"$maj_image_directory/members/$author_username/avatar.png",100);
+ imagepng($avatar_png_image_resize,"$maj_image_directory/members/$author_username/avatar.png",9);
imagedestroy($avatar_png_image_resize);
imagedestroy($avatar_png_image_original);
tree 7e28eed07e22e2eaac8de61ada8cdeecbe1c7c49
parent 35ba66b74bba3f0328e415893cde1fa57752288c
author Magie Antonio <magie@majcms.org> 1371895777 +0800
committer Magie Antonio <magie@majcms.org> 1371895777 +0800
Fix incorrect imagegif and imagepng quality
diff --git a/core.php b/core.php
index dc65757..dd65b9b 100644
--- a/core.php
+++ b/core.php
@@ -438,7 +438,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
unlink("$maj_image_directory/avatar.gif");
- imagegif($avatar_gif_image_resize,"$maj_image_directory/avatar.gif",100);
+ imagegif($avatar_gif_image_resize,"$maj_image_directory/avatar.gif");
imagedestroy($avatar_gif_image_resize);
imagedestroy($avatar_gif_image_original);
@@ -502,7 +502,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
unlink("$maj_image_directory/avatar.png");
- imagepng($avatar_png_image_resize,"$maj_image_directory/avatar.png",100);
+ imagepng($avatar_png_image_resize,"$maj_image_directory/avatar.png",9);
imagedestroy($avatar_png_image_resize);
imagedestroy($avatar_png_image_original);
@@ -548,7 +548,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
unlink("$maj_image_directory/members/$author_username/avatar.gif");
- imagegif($avatar_gif_image_resize,"$maj_image_directory/members/$author_username/avatar.gif",100);
+ imagegif($avatar_gif_image_resize,"$maj_image_directory/members/$author_username/avatar.gif");
imagedestroy($avatar_gif_image_resize);
imagedestroy($avatar_gif_image_original);
@@ -611,7 +611,7 @@ function maj_avatar_image($author_username,$max_img_width=80,$show_username=1,$s
unlink("$maj_image_directory/members/$author_username/avatar.png");
- imagepng($avatar_png_image_resize,"$maj_image_directory/members/$author_username/avatar.png",100);
+ imagepng($avatar_png_image_resize,"$maj_image_directory/members/$author_username/avatar.png",9);
imagedestroy($avatar_png_image_resize);
imagedestroy($avatar_png_image_original);