diff --git a/lib.php b/lib.php index 00e408a..4ec99cb 100644 --- a/lib.php +++ b/lib.php @@ -106,6 +106,18 @@ function get_cwd($url) } } +function sanitize_jpg($path) +{ + $image = new Imagick($path); + + $profiles = $image->getImageProfiles("icc", true); + + $image->Imagick::stripImage(); + +if(!empty($profiles)) + $image->profileImage("icc", $profiles['icc']); +} + function celebrate($dest_file, $item_type, $image_url, $image_alt, $meta_data = false) { diff --git a/res/config.php b/res/config.php index e016aff..5406f93 100644 --- a/res/config.php +++ b/res/config.php @@ -19,9 +19,9 @@ $url_aliasize_die_alt = "A whimsical mask on fire."; $url_aliasize_item = "mask"; // what the alias is affectionately called $url_aliasize_dir = "u/"; // where the redirects go -$url_aliasize_suffix = ".php"; // suffix to redirect links; some web-servers - // only execute ".php" files, so you might - // wanna keep ".php" as the suffix +$url_aliasize_suffix = ""; // suffix to redirect links; some web-servers + // only execute ".php" files, so if things + // don't work, set as ".php" // vars related to file uploading