Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transparent images displayed as black or unreadable #11418

Closed
anarcat opened this issue Oct 4, 2014 · 10 comments
Closed

transparent images displayed as black or unreadable #11418

anarcat opened this issue Oct 4, 2014 · 10 comments

Comments

@anarcat
Copy link

anarcat commented Oct 4, 2014

Steps to reproduce

  1. upload a simple PNG with black lines on a transparent background
  2. see the PNG appear in the list
  3. click on the PNG to display a larger preview

Expected behaviour

The 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.

Actual behaviour

In general, Owncloud doesn't deal very well with transparency in images it seems. First off, thumbnails aren't generated consistently:

image

The first image displays fine: no transparency. The second image is displayed with a black background, while the third and fourth are okay.

Yet, 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:

image

when i mouseover the image, i get a squared background:

image

but things are not much more readable.

this happens with the latter three images.

this is the equivalent crop of the image displayed in eog with a grey background, where it is actually readable:

image

Could there at least be a configurable setting to change the background so transparent images can be displayed properly?

Server configuration

Operating system: Debian wheezy

Operating system: Debian stable "wheezy" 7.6

Web server: Apache 2.2.22

Database: Mysql 5.5

PHP version: PHP 5.4.4

ownCloud version: 6.0.2

Updated from an older ownCloud or fresh install: updated from 5.x

List of activated apps:

Activity
Bookmarks
Calendar
Contacts
Deleted files
Documents
First Run Wizard
Full Text Search
LDAP user and group backend
PDF Viewer
Pictures
Share Files
Tasks
Text Editor
Versions
Video Viewer
Mozilla Sync3rd Party

The content of config/config.php:

<?php
define('DEBUG',true);
$CONFIG = array (
  'instanceid' => 'redacted',
  'passwordsalt' => 'redacted',
  'trusted_domains' =>
  array (
    0 => 'nuage.koumbit.net',
  ),
  'datadirectory' => '/usr/share/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '6.0.2.2',
  'appstoreenabled' => true,
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/usr/share/owncloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/lib/owncloud/apps',
      'url' => '/cloudapps',
      'writable' => true,
    ),
  ),
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => 'redacted',
  'installed' => true,
  'forcessl' => true,
  'ldapIgnoreNamingRules' => false,
  'loglevel' => '2',
);

Are you using external storage, if yes which one: i don't believe so

Are you using encryption: HTTPS?

Client configuration

Browser: Version 37.0.2062.120 Debian jessie/sid (281580) (64-bit)

Similar results with Iceweasel 31.1.0.

Logs

Web server error log

Hitting the preview gives me:

nuage.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
nuage.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

ownCloud log (data/owncloud.log)

There 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:

{"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"}

Browser log

What's a browser log exactly?

@anarcat
Copy link
Author

anarcat commented Oct 4, 2014

note that this looks similar to #7148 but i believe it is a separate issue.

@ghost
Copy link

ghost commented Oct 5, 2014

Hi,

have you tried to apply the fix here:

#10362

This will be included in 7.0.3

@anarcat
Copy link
Author

anarcat commented Oct 6, 2014

i have tried. it doesn't fix the problem. maybe it will make the "preview is black" problem go away, but my main problem is to have a way to display the image properly in the main view, not the preview. and in here it doesn't work: the background is white or gray, but generally the image is unreadable.

@PVince81
Copy link
Contributor

PVince81 commented Aug 3, 2015

@anarcat are you still seeing this in 8.0.5 or 8.1 ?

CC @oparoz @georgehrke

@anarcat
Copy link
Author

anarcat commented Aug 3, 2015

i can't unfortunately test this right now, as an upgrade is quite an enterprise. :)

@oparoz
Copy link
Contributor

oparoz commented Aug 3, 2015

Regarding the Files app, it's still a problem. The same background is returned for all images, no image analysis is performed either in PHP or JS.

The fullscreen problem has been solved and can be further improved via owncloud/gallery#84

@PVince81
Copy link
Contributor

PVince81 commented Oct 8, 2015

@oparoz any update on this ? Is this still an issue ?

@oparoz
Copy link
Contributor

oparoz commented Oct 8, 2015

@PVince81 - Not sure about the black thumbnails in Files as we would need a test file to be able to witness it, but as mentioned above, not analysis is performed on images and the background is set to white in Files, so any white image with a transparent background are invisible (other issue opened about that).

Regarding the slideshow, it's all documented in owncloud/gallery.

@PVince81
Copy link
Contributor

PVince81 commented Oct 8, 2015

@anarcat can you share a test file ?

@MorrisJobke
Copy link
Contributor

Tested with https://commons.wikimedia.org/wiki/File:600_px_Transparent_flag.png in master -> works.

Reproduced this in stable6. And checked also in stable8, where it is fixed -> close

@MorrisJobke MorrisJobke added this to the 8.0 milestone Nov 11, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants