summaryrefslogtreecommitdiff
path: root/lib/thumbnails.php
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-06-25 00:13:02 +0500
committerilotterytea <iltsu@alright.party>2025-06-25 00:13:02 +0500
commit17cdae613d339d31aacabfd232fdd9f67bea6c3a (patch)
tree8824c7c0e55bdec8d1eaf129d97257b3fbbfede9 /lib/thumbnails.php
parentc734db91064944637e361f90ed90b30d48a7d910 (diff)
feat: custom swf parser because swftools is obsolete
Diffstat (limited to 'lib/thumbnails.php')
-rw-r--r--lib/thumbnails.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/thumbnails.php b/lib/thumbnails.php
index 5e99087..5afc775 100644
--- a/lib/thumbnails.php
+++ b/lib/thumbnails.php
@@ -10,15 +10,7 @@ function generate_image_thumbnail(string $src_path, string $dst_path, int $width
$result_code = null;
- if (str_ends_with($src_path, ".swf")) {
- exec(command: "swfrender $input_path -o $output_path", result_code: $result_code);
- if ($result_code != 0) {
- return $result_code;
- }
- exec(command: "magick $output_path -resize {$width}x{$height} -loop 0 $output_path", result_code: $result_code);
- } else {
- exec(command: "magick $input_path -resize {$width}x{$height} -loop 0 $output_path", result_code: $result_code);
- }
+ exec(command: "magick $input_path -resize {$width}x{$height} -loop 0 $output_path", result_code: $result_code);
return $result_code;
}