{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/11418","labels_url":"https://api.github.com/repos/owncloud/core/issues/11418/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/11418/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/11418/events","html_url":"https://github.com/owncloud/core/issues/11418","id":44889496,"number":11418,"title":"transparent images displayed as black or unreadable","user":{"login":"anarcat","id":796623,"avatar_url":"https://avatars.githubusercontent.com/u/796623?v=3","gravatar_id":"","url":"https://api.github.com/users/anarcat","html_url":"https://github.com/anarcat","followers_url":"https://api.github.com/users/anarcat/followers","following_url":"https://api.github.com/users/anarcat/following{/other_user}","gists_url":"https://api.github.com/users/anarcat/gists{/gist_id}","starred_url":"https://api.github.com/users/anarcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anarcat/subscriptions","organizations_url":"https://api.github.com/users/anarcat/orgs","repos_url":"https://api.github.com/users/anarcat/repos","events_url":"https://api.github.com/users/anarcat/events{/privacy}","received_events_url":"https://api.github.com/users/anarcat/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/owncloud/core/labels/feature:previews","name":"feature:previews","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-10-04T17:46:14Z","updated_at":"2015-11-11T13:23:22Z","closed_at":"2015-11-11T13:23:22Z","body":"### Steps to reproduce\r\n1. upload a simple PNG with black lines on a transparent background\r\n2. see the PNG appear in the list\r\n3. click on the PNG to display a larger preview\r\n\r\n### Expected behaviour\r\n\r\nThe images should be generally visible, either on a grey or white background. Transparency should be detected and ideally, the color average of the picture should be evaluated to tell if the background should be dark or light.\r\n\r\n### Actual behaviour\r\n\r\nIn general, Owncloud doesn't deal very well with transparency in images it seems. First off, thumbnails aren't generated consistently:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/796623/4516242/877dc608-4beb-11e4-8b84-9ee875605386.png)\r\n\r\nThe first image displays fine: no transparency. The second image is displayed with a black background, while the third and fourth are okay.\r\n\r\nYet, when displayed in fullscreen, things don't get much better. The first image displays fine again, but the last three similarly fail to display properly. They are displayed with a black background:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/796623/4516249/ee18ac02-4beb-11e4-8a04-a8efd04c26c7.png)\r\n\r\nwhen i mouseover the image, i get a squared background:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/796623/4516256/3bb925b8-4bec-11e4-90ea-0bb164a81bea.png)\r\n\r\nbut things are not much more readable.\r\n\r\nthis happens with the latter three images.\r\n\r\nthis is the equivalent crop of the image displayed in `eog` with a grey background, where it is actually readable:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/796623/4516258/6e091014-4bec-11e4-97b5-9d23075907ec.png)\r\n\r\nCould there at least be a configurable setting to change the background so transparent images can be displayed properly?\r\n\r\n### Server configuration\r\n**Operating system**: Debian wheezy\r\n\r\n**Operating system**: Debian stable \"wheezy\" 7.6\r\n\r\n**Web server:** Apache 2.2.22\r\n\r\n**Database:** Mysql 5.5\r\n\r\n**PHP version:** PHP 5.4.4\r\n\r\n**ownCloud version:** 6.0.2\r\n\r\n**Updated from an older ownCloud or fresh install:** updated from 5.x\r\n\r\n**List of activated apps:**\r\n\r\nActivity\r\nBookmarks\r\nCalendar\r\nContacts\r\nDeleted files\r\nDocuments\r\nFirst Run Wizard\r\nFull Text Search\r\nLDAP user and group backend\r\nPDF Viewer\r\nPictures\r\nShare Files\r\nTasks\r\nText Editor\r\nVersions\r\nVideo Viewer\r\nMozilla Sync3rd Party\r\n\r\n**The content of config/config.php:**\r\n\r\n```\r\n<?php\r\ndefine('DEBUG',true);\r\n$CONFIG = array (\r\n  'instanceid' => 'redacted',\r\n  'passwordsalt' => 'redacted',\r\n  'trusted_domains' =>\r\n  array (\r\n    0 => 'nuage.koumbit.net',\r\n  ),\r\n  'datadirectory' => '/usr/share/owncloud/data',\r\n  'dbtype' => 'mysql',\r\n  'version' => '6.0.2.2',\r\n  'appstoreenabled' => true,\r\n  'apps_paths' =>\r\n  array (\r\n    0 =>\r\n    array (\r\n      'path' => '/usr/share/owncloud/apps',\r\n      'url' => '/apps',\r\n      'writable' => false,\r\n    ),\r\n    1 =>\r\n    array (\r\n      'path' => '/var/lib/owncloud/apps',\r\n      'url' => '/cloudapps',\r\n      'writable' => true,\r\n    ),\r\n  ),\r\n  'dbname' => 'owncloud',\r\n  'dbhost' => 'localhost',\r\n  'dbtableprefix' => 'oc_',\r\n  'dbuser' => 'owncloud',\r\n  'dbpassword' => 'redacted',\r\n  'installed' => true,\r\n  'forcessl' => true,\r\n  'ldapIgnoreNamingRules' => false,\r\n  'loglevel' => '2',\r\n);\r\n```\r\n\r\n**Are you using external storage, if yes which one:** i don't believe so\r\n\r\n**Are you using encryption:** HTTPS?\r\n\r\n### Client configuration\r\n**Browser:** Version 37.0.2062.120 Debian jessie/sid (281580) (64-bit)\r\n\r\nSimilar results with Iceweasel 31.1.0.\r\n\r\n### Logs\r\n#### Web server error log\r\n\r\nHitting the preview gives me:\r\n```\r\nnuage.koumbit.net:443 72.0.72.144 - - [04/Oct/2014:13:35:33 -0400] \"GET /index.php/apps/gallery/ajax/image.php?file=anarcat%2F%2Fnetmap-2010.png HTTP/1.1\" 200 27236 \"https://nuage.koumbit.net/index.php/apps/files\" \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36\" 99221 27818\r\nnuage.koumbit.net:443 72.0.72.144 - - [04/Oct/2014:13:35:33 -0400] \"GET /index.php/apps/gallery/ajax/image.php?file=anarcat%2F%2Fnetmap-2011.png HTTP/1.1\" 200 63009 \"https://nuage.koumbit.net/index.php/apps/files\" \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36\" 36506 27818\r\n```\r\n\r\n#### ownCloud log (data/owncloud.log)\r\n\r\nThere are a metric ton of stuff in that log, and I don't feel comfortable posting it here. However I do see messages like this:\r\n\r\n```\r\n{\"app\":\"OCP\\\\Share\",\"message\":\"Sharing backend OCA\\\\Contacts\\\\Share\\\\Addressbook not registered, OCA\\\\Contacts\\\\Share\\\\Addressbook is already registered for addressbook\",\"level\":2,\"time\":\"2014-10-04T17:36:49+00:00\"}\r\n```\r\n\r\n#### Browser log\r\n\r\nWhat's a browser log exactly?"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/155784602","html_url":"https://github.com/owncloud/core/issues/11418#issuecomment-155784602","issue_url":"https://api.github.com/repos/owncloud/core/issues/11418","id":155784602,"user":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T13:23:22Z","updated_at":"2015-11-11T13:23:22Z","body":"Tested with https://commons.wikimedia.org/wiki/File:600_px_Transparent_flag.png in master -> works.\r\n\r\nReproduced this in stable6. And checked also in stable8, where it is fixed -> close"}}