Fourth pass at adding key files

This commit is contained in:
dsainty
2024-06-17 22:30:36 +10:00
parent 08eb7b7da2
commit 67ccdbcc34
132 changed files with 11416 additions and 0 deletions

View File

@ -0,0 +1,30 @@
#!/usr/bin/perl
use Image::Magick;
my ($image);
my $filename = shift || exit(0);
my $append = shift || "";
my $max_height = shift || 200;
if ($append eq "---") { $append = ""; }
my $base = '/var/home/slowtwitch/slowtwitch.com/www/tick/images/gallery';
my $new_filename = "${base}/${append}${filename}";
$image = Image::Magick->new;
$image->Read("${base}/${filename}");
$width = $image->Get('columns');
$height = $image->Get('rows');
if (($width > 900) || ($height > $max_height))
{
$image->Resize(geometry=>"${width}x${max_height}");
# $image->Scale(geometry=>"${longest_side}x${longest_side}");
# $image->Border(geometry=>'5x5');
$image->Write(filename=>"${new_filename}", quality=>'75');
}
undef $image;
exit(0);