my $Absolute_URL = "$gallerycfg{'UPLOAD'}/$imgparams{username}/$imgparams{PicID}.jpg"; my $image = new Image::Magick; my ($image_x,$image_y) = $image->Ping($Absolute_URL); #Set to a high number for error trapping $imgparams{THREED}=5; #Determine if image is 3D based on width if ($image_x>$gallerycfg{'3DWIDTH'}){$imgparams{THREED}=1; }else{$imgparams{THREED}=0;} #Makes sure we got information on this picture. unless ($imgparams{THREED}<2){ &writelog ("Error blah blah $Absolute_URL.",1); &dieerr("The image blah blah inconvenience."); }