Forum

Thread tagged as: Question, Problem

black border arpund png images

Hi

Having an issue with some pngs when they are resized. There is a black outline around them. The original file which is uploaded has no black border around it but the smaller versions do. Not quite sure if it has something to do with perch or what the best solution might be.

Peter

Peter Meenagh

Peter Meenagh 0 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please post your Diagnostics Report, and an example image would be helpful.

Hi Rachel

Here's an example of the image https://petermeenagh.co.uk/snares.png

Here's the Diagnostics Report. I've changed the site url and some of my clients info in this.

Perch information

Perch: 2.8.19
Production mode: Production (100)
Installed apps: content (2.8.19), assets (2.8.19), categories (2.8.19), perch_shop_paypal (1.2.3), perch_members (1.3)
DB driver: PDO
DB tables: perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_members, perch2_members_forms, perch2_members_member_tags, perch2_members_sessions, perch2_members_tags, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_shop_categories, perch2_shop_log, perch2_shop_orders, perch2_shop_product_options, perch2_shop_products, perch2_shop_products_to_categories, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 3
App runtimes:

<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_shop_paypal',
        'perch_members',
    );

Editor plug-ins: ckeditor, markitup
H1: 15139cccc04346f9abb0c4ed5a5508c9
L1: 4213fc09b9f1d216b16600e41659f8fe
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.19: done
latest_version: 2.8.15
on_sale_version: 2.8.27
headerScheme: light
hide_pwd_reset: 1
perch_shop_paypal_email: emailaddress_here
perch_shop_product_url: /shop/product.php?s={productSlug}
dashboard: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_shop_display_oos: 0
logoPath: /admin/resources/1450671576_admin-logo.png
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: perchuser
PERCH_DB_SERVER: mysql.sitename.co.uk
PERCH_DB_DATABASE: andante_perch_db
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: david@sitename
PERCH_EMAIL_FROM_NAME: David
PERCH_LOGINPATH: /admin
PERCH_PATH: /home/SITENAME/SITENAME/admin
PERCH_CORE: /home/SITENAME/SITENAME/admin/core
PERCH_RESFILEPATH: /home/SITENAME/SITENAME/admin/resources
PERCH_RESPATH: /admin/resources
PERCH_HTML5: 1
PERCH_RUNWAY:
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/SITENAME/SITENAME/admin/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20

Hosting settings

PHP: 5.6.19
Zend: 2.6.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
MySQL server: 5.6.25-log
Extensions: Core, date, ereg, libxml, pcre, sqlite3, filter, mbstring, SPL, PDO, Reflection, pdo_sqlite, hash, session, cgi-fcgi, bcmath, bz2, calendar, ctype, curl, dom, standard, ftp, gd, gettext, exif, iconv, imap, json, mcrypt, mysqlnd, mysqli, openssl, pcntl, pdo_mysql, posix, pspell, mysql, SimpleXML, soap, sockets, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib, imagick, mhash, Zend OPcache
GD: Yes
ImageMagick: Yes
PHP max upload size: 64M
PHP max form post size: 65M
PHP memory limit: 90M
Total max uploadable file size: 64M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
PATH: /bin:/usr/bin:/sbin:/usr/sbin
RAILS_ENV: production
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
REQUEST_URI: /admin/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.1
GATEWAY_INTERFACE: CGI/1.1
REMOTE_PORT: 64483
SCRIPT_FILENAME: /home/SITENAME/SITENAME/admin/core/settings/diagnostics/index.php
SERVER_ADMIN: webmaster@SITENAME
DOCUMENT_ROOT: /home/SITENAME/SITENAME
REMOTE_ADDR: 5.80
SERVER_PORT: 80
SERVER_ADDR: 173.236
SERVER_NAME: sitename
SERVER_SOFTWARE: Apache
HTTP_CONNECTION: close
HTTP_COOKIE: cmsa=1; PHPSESSID=IRm0jXrjisxvLXMNevgOe0
HTTP_REFERER: https://sitename/admin/core/settings/diagnostics/
HTTP_DNT: 1
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.5
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:44.0) Gecko/20100101 Firefox/44.0
HTTP_HOST: sitename
DH_USER: siteuser
dsid: 30419852
SCRIPT_URI: https://sitename/admin/core/settings/diagnostics/
SCRIPT_URL: /admin/core/settings/diagnostics/
UNIQUE_ID: Vu@7363s4JgAABAIHUcAAAAL
FCGI_ROLE: RESPONDER
PHP_SELF: /admin/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1458551775.7426
REQUEST_TIME: 1458551775
Drew McLellan

Drew McLellan 2638 points
Perch Support

How many colours are in the original image?

(I'm presuming you're talking about the colour fringing, because the image itself does not have a black outline.)

The image has only black and white as the colours.

Yes the black fringing around the the image is what I meant and this is being added whenever the image is being resized.

Drew McLellan

Drew McLellan 2638 points
Perch Support

How big is the original image?

1417 x 1417

Drew McLellan

Drew McLellan 2638 points
Perch Support

I'm not sure why that would happen.

I'm not sure either. It's fine whenever not resized and I've tried density="2" on the images but still the same issue.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you tried with Imagick instead?

I haven't yet. Might give that a go and see. Could it be the way the png is initially saved before it is uploaded?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It could be, yes. If it only has a two colour palette saved with the image, I'm not sure what would happen when you try to resize.