From 9ebf0f7bcaaafb675218ffbc52f65888fac5950b Mon Sep 17 00:00:00 2001 From: fusionate Date: Fri, 27 Sep 2024 11:56:38 -0600 Subject: [PATCH] Contact - Attachments: Preserve image transparency, large viewing on edit page, other minor adjustments. --- app/contacts/contact_attachment_edit.php | 2 ++ app/contacts/contact_attachments_view.php | 2 +- app/contacts/contact_edit.php | 36 ++++++++++++----------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/app/contacts/contact_attachment_edit.php b/app/contacts/contact_attachment_edit.php index 846318c596..23642505a0 100644 --- a/app/contacts/contact_attachment_edit.php +++ b/app/contacts/contact_attachment_edit.php @@ -109,6 +109,8 @@ if (in_array($attachment_extension, $image_extensions)) { //create the image object from the content string $image = imagecreatefromstring($attachment_content); + imagealphablending($image, FALSE); + imagesavealpha($image, TRUE); //start output buffering to capture the image data ob_start(); diff --git a/app/contacts/contact_attachments_view.php b/app/contacts/contact_attachments_view.php index 645f65dc29..197761a30f 100644 --- a/app/contacts/contact_attachments_view.php +++ b/app/contacts/contact_attachments_view.php @@ -55,7 +55,7 @@ echo "\n"; + echo "\n"; + } + //show the content echo "
\n"; echo "\n"; @@ -2301,7 +2318,7 @@ if (permission_exists('contact_relation_view')) { $x = 0; foreach($contact_relations as $row) { - + //get contact details and contact_name $sql = "select contact_uuid, contact_organization, contact_name_given, contact_name_family, contact_nickname "; $sql .= "from v_contacts "; @@ -2545,21 +2562,6 @@ if (permission_exists('contact_attachment_view')) { } echo " \n"; - //styles and attachment layer - echo "\n"; - echo "\n"; - //script echo "