Browse Source

disable play stamp for gifs

Andrew Dolgov 4 weeks ago
parent
commit
8e0d742cc4
1 changed files with 3 additions and 2 deletions
  1. 3 2
      init.php

+ 3 - 2
init.php

@@ -27,7 +27,8 @@ class Api_Resize_Media extends Plugin {
 		$host->add_hook($host::HOOK_ARTICLE_IMAGE, $this, 999);
 	}
 
-	private function make_thumbnail($input_filename, $output_filename, $dim_max_x = 600, $dim_max_y = 600, $content_type = "", $force_stamp = false) {
+	private function make_thumbnail($input_filename, $output_filename, $dim_max_x = 600, $dim_max_y = 600,
+									$content_type = "", $force_stamp = false) {
 
 		if ($content_type == "image/webp") {
 			$o_im = @imagecreatefromwebp($input_filename);
@@ -59,7 +60,7 @@ class Api_Resize_Media extends Plugin {
 			$t_im = imageCreateTrueColor($t_width, $t_height);
 			$need_stamp = false;
 
-			if ($force_stamp || ($imageinfo && $imageinfo["mime"] == "image/gif")) {
+			if ($force_stamp /*|| ($enable_stamp && $imageinfo && $imageinfo["mime"] == "image/gif")*/) {
 				$need_stamp = true;
 				imageFill($t_im, 0, 0, 0xffffff);
 			/*} else { -- this might make resized image significantly larger