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

PNGs aren't recognized as photos #208

Closed
poperigby opened this issue Feb 25, 2020 · 24 comments · Fixed by #278
Closed

PNGs aren't recognized as photos #208

poperigby opened this issue Feb 25, 2020 · 24 comments · Fixed by #278
Labels
2. developing Work in progress enhancement New feature or request

Comments

@poperigby
Copy link

poperigby commented Feb 25, 2020

Steps to reproduce

Upload a photo that has the .png filename extension

Expected behaviour

The .png is recognized as a photo by the Photos app

Actual behaviour

The .png is not recognized as a photo by the Photos app, and therefore doesn't show up in Your photos, and it's parent folder isn't listed in Your albums.

Server configuration detail

Operating system: Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64

Webserver: nginx/1.16.1 (fpm-fcgi)

Database: mysql 10.4.12

PHP version:

7.3.14
Modules loaded: Core, date, libxml, pcre, zlib, filter, hash, readline, Reflection, SPL, session, cgi-fcgi, bz2, ctype, curl, dom, fileinfo, ftp, gd, gmp, iconv, intl, json, ldap, mbstring, openssl, pcntl, PDO, pgsql, posix, standard, SimpleXML, smbclient, sodium, sqlite3, xml, xmlwriter, zip, exif, imap, mysqlnd, pdo_pgsql, pdo_sqlite, Phar, xmlreader, pdo_mysql, apcu, igbinary, redis, memcached, imagick, mcrypt, libsmbclient, Zend OPcache

Nextcloud version: 18.0.1 - 18.0.1.3

Updated from an older Nextcloud/ownCloud or fresh install: Older version of Nextcloud

Where did you install Nextcloud from: LinuxServer Docker image

List of activated apps
Enabled:
 - accessibility: 1.4.0
 - activity: 2.11.0
 - apporder: 0.9.0
 - calendar: 2.0.1
 - checksum: 0.4.4
 - cloud_federation_api: 1.1.0
 - comments: 1.8.0
 - contacts: 3.1.8
 - cookbook: 0.5.7
 - dav: 1.14.0
 - extract: 1.2.3
 - federatedfilesharing: 1.8.0
 - federation: 1.8.0
 - files: 1.13.1
 - files_downloadactivity: 1.7.0
 - files_pdfviewer: 1.7.0
 - files_rightclick: 0.15.2
 - files_sharing: 1.10.1
 - files_trashbin: 1.8.0
 - files_versions: 1.11.0
 - files_videoplayer: 1.7.0
 - firstrunwizard: 2.7.0
 - groupfolders: 6.0.1
 - issuetemplate: 0.6.0
 - logreader: 2.3.0
 - lookup_server_connector: 1.6.0
 - maps: 0.1.5
 - metadata: 0.11.1
 - news: 14.1.3
 - nextcloud_announcements: 1.7.0
 - notes: 3.1.5
 - notifications: 2.6.0
 - oauth2: 1.6.0
 - ocsms: 2.1.7
 - onlyoffice: 4.1.4
 - password_policy: 1.8.0
 - photos: 1.0.0
 - privacy: 1.2.0
 - provisioning_api: 1.8.0
 - ransomware_protection: 1.6.0
 - recommendations: 0.6.0
 - serverinfo: 1.8.0
 - settings: 1.0.0
 - sharebymail: 1.8.0
 - support: 1.1.0
 - survey_client: 1.6.0
 - suspicious_login: 3.1.0
 - systemtags: 1.8.0
 - tasks: 0.11.3
 - text: 2.0.0
 - theming: 1.9.0
 - twofactor_backupcodes: 1.7.0
 - twofactor_totp: 4.1.2
 - updatenotification: 1.8.0
 - video_converter: 0.1.3
 - viewer: 1.2.0
 - workflowengine: 2.0.0
Disabled:
 - admin_audit
 - encryption
 - files_antivirus
 - files_external
 - user_ldap

Configuration (config/config.php)
{
    "memcache.local": "\\OC\\Memcache\\APCu",
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "https:\/\/cloud.haddock.cc\/",
    "overwritehost": "cloud.haddock.cc",
    "overwriteprotocol": "https",
    "trusted_domains": [
        "cloud.haddock.cc"
    ],
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "18.0.1.3",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "mysql.utf8mb4": true,
    "installed": true,
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_sendmailmode": "pipe",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "twofactor_enforced": "false",
    "twofactor_enforced_groups": [
        "admin"
    ],
    "twofactor_enforced_excluded_groups": [],
    "maintenance": false,
    "theme": "",
    "loglevel": 2,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "1587"
}

Are you using external storage, if yes which one: Local

Are you using encryption: true

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

Operating system: ArchLinux

@skjnldsv
Copy link
Member

Hey! :)

Can you give a little background on why do you have png photos?
I am not aware of any devices where you'll end up with png (yet, but I don't know every devices out there ;) )

Thanks for your report and your help! 🚀

@poperigby
Copy link
Author

All of my PNGs are from screenshots on my phone and desktop.

@skjnldsv
Copy link
Member

Ah well. This app aimed to be photos oriented.
Let's ping @jancborchardt and hear from him :)

@skjnldsv skjnldsv added 0. Needs triage Pending approval or rejection. This issue is pending approval. discussion Being discussed enhancement New feature or request labels Feb 26, 2020
@skjnldsv
Copy link
Member

skjnldsv commented Mar 4, 2020

Well that's disappointing. So photos is not aimed at any artists or people who need high quality images?

This would also fall under scanned photographs from people who are backing up film negatives or backing up photos. Certainly don't want those saved in jpeg.

Originally posted by @dragon988 in #223 (comment)


So I find this interesting, thanks everyone here for the help understanding your use of photos :)
So, my main concern is to not clutter the ui with unnecessary images.
Usually png are not photos, your use of it seems like a niche amongst usual users, right?
Or do you consider this as a real standard way?

For example, I have backups of websites hosted or stuff like that.
I don't want to suddenly see 2k sprites on photos, that would not make sense :)
Do you agree?

What solutions do you have in mind?

@SimplyCorbett
Copy link

Usually png are not photos, your use of it seems like a niche amongst usual users, right?

Your use case is phone cameras which save as jpeg with raw images. But regular cameras shoot images in a variety of formats from raw to tiff and png/jpeg.

Most people who shell out the money for a dedicated camera will not use jpeg. Can't speak for everyone though.

Just my two cents! Have a good day.

@skjnldsv
Copy link
Member

skjnldsv commented Mar 4, 2020

Your use case is phone cameras which save as jpeg with raw images. But regular cameras shoot images in a variety of formats from raw to tiff and png/jpeg.

Exactly. We need to keep in mind nextcloud users are usually not professional photographer :)
That's why it's tricky to please everyone on those issues. You do agree that your use case is rather unusual, or do you think it's more common than we can think? 🤔

@SimplyCorbett
Copy link

SimplyCorbett commented Mar 4, 2020

You do agree that your use case is rather unusual, or do you think it's more common than we can think?

My particular use case is outside of the norm yes. Not even arguing that point :)

But going back to actual cameras. That's not a niche use case.. people do take pictures with regular cameras. It's not even a professional setting. Lots of people (myself included) use/have used dedicated cameras in the past.

Even if they opted to use jpeg from now on it doesn't change that their previous photographs are unviewable without converting them and causing quality loss.

Anyway, it's not crucial for this to be fixed on my end. I just wasn't sure if you were aware of the issue.

@skjnldsv
Copy link
Member

skjnldsv commented Mar 4, 2020

Even if they opted to use jpeg from now on it doesn't change that their previous photographs are unviewable without converting them and causing quality loss.

That is a valid point! Thanks :)

Anyway, it's not crucial for this to be fixed on my end. I just wasn't sure if you were aware of the issue.

Well, I think it is important to listen to different uses case ;)

@skjnldsv
Copy link
Member

skjnldsv commented Mar 4, 2020

Maybe support those files types with a minimum file size? That would exclude unwanted png/jpeg pretty fast ?

@matiasdelellis
Copy link

In principle, I have the same problem with png files, but I really admit that they can also be used as photos, and solve it with the .nomedia files, In 90% of cases it is more than enough.

Android Gallery uses that and it works well.. Maybe the improvement should be just make it easier

@skjnldsv
Copy link
Member

skjnldsv commented Mar 5, 2020

Yes, 141 is planned as well :)

@willyouvba
Copy link

Can the inclusion of specific file types in photos be optional?
In addition to PNGs not being included, HEICs are not shown in the app. This is perhaps another niche case but it is the default photo type for iOS devices with an A9 chip or above (iPhone 7 or later). This worked with the gallery app, provided the latest version of imagemagik was used.

@skjnldsv
Copy link
Member

skjnldsv commented Mar 9, 2020

@willyouvba this is pretty similar yes! :)
I guess it make sense for heic as well!

@jancborchardt
Copy link
Member

HEIC should for sure be supported, as they are a specifically "photo" file type. :)

PNGs still not sure … as @skjnldsv said this is a "Photos" app – for png graphic files there’s the Files grid view. We don’t want the view to be cluttered with irrelevant images and also not require people to use .nomedia (which most people do not know about). Are there any cameras which actually use png as photo file type?

iOS Photos for example offers to "Save Screenshot to Photos". A last resort for us could be a bottom left settings switch saying "Show non-photo image files", disabled by default. But it’s really not a priority for now.

@dermalikmann
Copy link

To add my two cents to this:

I used to edit some of my photos with PS or GIMP and, mostly out of habit, I saved the result as PNG, so quite a lot of my photos are PNG. Out of the same habit I changed Open Camera on my Android, to save the images as PNG. So I personally would prefer to be PNG a supported format.

As for the part of cluttering with irrelevant images and sprites: As soon as #141 is done this problem should "vanish in a puff of logic" [1].

Again, this is only a "nice-to-have" (maybe a "really-nice-to-have") but nothing that would break anything as the NC viewer still shows PNG without a problem.

@skjnldsv
Copy link
Member

Again, this is only a "nice-to-have" (maybe a "really-nice-to-have") but nothing that would break anything as the NC viewer still shows PNG without a problem.

This would work fine indeed, this is just a matter of default user experience :)
Thanks a lot for your feedback!

@frlan
Copy link
Contributor

frlan commented Apr 10, 2020

I'm scanning old photos rather to PNG than to JPEG so I got a bunch of pictures thar are png....

@nursoda
Copy link

nursoda commented May 1, 2020

I understand that the photos app tries to be smart and use all photos in the whole cloud. Considering that as a preset, inclusion of other picture formats such as PNG might not be a good idea. However, at least in my cases (my company NC, my family NC, my club NCs) we have DEDICATED FOLDERS for pictures and in all cases, I want to see THEM only, and ALL types of images (including scans), this is PNG, TIF, BMP, etc.

Apart from that, if the Photos app would be here for pictures from digicams, then JPG is by far not the only image type to display, there would be different raw typs, HEIC, etc.

@yeupou

This comment has been minimized.

@skjnldsv

This comment has been minimized.

@yeupou
Copy link

yeupou commented May 5, 2020

skjnldsv,

I think "supported by all web browsers" "lossless data compression" make a usecase by itself: anyone doing a photo blog, for instance, will be interested by this two points.
It's similar to the music player app: should it ignore FLAC because some software use FLAC for their event sounds?

Your first comment on this thread was "Can you give a little background on why do you have png photos?". I think it was quite necessary to voice the fact that PNG for photos is not some unheard of strange thing, many people use it (granted: people that tends to edit, modify, etc), some very often, and the lack of comments on this thread is probably not representative.

So the question is not whether there is incentive to "help" one individual posting here but whether a Photos app on something with such a general scope as nextcloud can actually arbitrarily ignore files based on their format.
The image-size based filter discussed on another thread makes much more sense.

Off topic Moreover, the choice to switch from Gallery to Photos was already very questionable the way it appeared (no one seriously expect a switch from one stable version to another to get such feature regression). The fact that the name is now called "Photos" does not change the fact that some users were actually using *galleries*, which means images in general and not necessarily photos.

Update: ok forget it. I've just noticed you marked "off-topic" my comment to #320, because I felt it was related to this whole topic. Turns out #320 was exactly related to this topic.
Dont think about incentive to help me, think about helping yourself: your behavior does not advocate in favor of Nextcloud, especially when you do not even realize you might be dealing with people whose employers, not small accounts, are actually giving a try to Nextcloud these days.

@skjnldsv

This comment has been minimized.

@yeupou
Copy link

yeupou commented May 5, 2020

For the record, in Gallery (https://github.com/nextcloud/gallery), supporting more media types was a matter of having in config:

'enabledPreviewProviders' =>
array (
0 => 'OC\Preview\PNG',
1 => 'OC\Preview\JPEG',
2 => 'OC\Preview\GIF',
11 => 'OC\Preview\Illustrator',
12 => 'OC\Preview\Postscript',
13 => 'OC\Preview\Photoshop',
14 => 'OC\Preview\TIFF'
),

@skjnldsv skjnldsv removed the 0. Needs triage Pending approval or rejection. This issue is pending approval. label May 5, 2020
@skjnldsv skjnldsv added the 1. to develop Accepted and waiting to be taken care of label May 5, 2020
@jancborchardt
Copy link
Member

This discussion is unnecessary. There is a pull request to fix this at #278
There’s even also one to add HEIC: #318

If anyone wants to contribute, do it by testing and reviewing those pull requests. Locking the issue since it’s not productive anymore.

@nextcloud nextcloud locked as too heated and limited conversation to collaborators May 5, 2020
@jancborchardt jancborchardt added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of discussion Being discussed labels May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2. developing Work in progress enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants