| Server IP : 208.122.213.31 / Your IP : 216.73.216.185 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/bukkake-mpegs.com/cgi-bin/tgp/ |
Upload File : |
#!/usr/bin/perl
##############################
## AutoGallery Pro v2.1.x ##
############################################################
## magick.pl - ImageMagick image manipulation functions ##
############################################################
use Image::Magick;
$MAGICK = 1;
## process thumbnail
sub processImage
{
my $file = shift;
my $cat = shift;
my $image;
my $result;
## Make sure default height and width are available
$MAX_WIDTH = 88 if( !$MAX_WIDTH );
$MAX_HEIGHT = 88 if( !$MAX_HEIGHT );
$QUALITY = 75 if( !$QUALITY );
$image = new Image::Magick;
$result = $image->Read($file);
if( $result )
{
err($result, $file);
}
($orig_width, $orig_height) = $image->Get('width', 'height');
## Dimensions are equal
if( $orig_width == $orig_height )
{
$image->Resize(width=>$MAX_WIDTH, height=>$MAX_HEIGHT, filter=>Lanczos, blur=>1.0);
}
## Dimensions not equal
else
{
## Width is the smaller dimension
if( $orig_width < $orig_height )
{
$new_width = $MAX_WIDTH;
$new_height = $orig_height*($MAX_WIDTH/$orig_width);
$srcX = 0;
$srcY = ($new_height-$MAX_HEIGHT)/2;
}
## Height is smaller dimension
else
{
$new_width = $orig_width*($MAX_HEIGHT/$orig_height);
$new_height = $MAX_HEIGHT;
$srcX = ($new_width-$MAX_WIDTH)/2;
$srcY = 0;
}
$image->Resize(width=>$new_width, height=>$new_height, filter=>Lanczos, blur=>1.0);
$image->Crop(width=>$MAX_WIDTH, height=>$MAX_HEIGHT, x=>$srcX, y=>$srcY);
}
if( $USE_SHARPEN )
{
$image->Sharpen(radius=>0.5, sigma=>1.0);
}
if( $USE_SHOW_CAT )
{
annotateImage($image, $cat);
}
$image->Set(quality => $QUALITY);
$image->Write($file);
}
## display text on thumbnail
sub annotateImage
{
my $file = shift;
my $cat = shift;
my $image;
if( $file =~ /Image::Magick/ )
{
$image = $file;
}
else
{
$image = new Image::Magick;
$image->Read($file);
}
$image->Annotate(
text => $cat,
font => $THUMB_FONT,
pointsize => '20',
stroke => 'black',
strokewidth => '1',
fill => 'white',
antialias => 'true',
x => '2',
y => ($MAX_HEIGHT - 4)
);
if( $file !~ /Image::Magick/ )
{
$image->Set(quality => $QUALITY);
$image->Write($file);
}
}