From 7f820c08fce4bfaeb44b71e7295af0924f7a15d0 Mon Sep 17 00:00:00 2001 From: Jaidyn Lev Date: Sat, 7 Apr 2018 21:48:41 -0500 Subject: [PATCH] Started EFIX-stripping --- lib.php | 12 ++++++++++++ res/config.php | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) 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