After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745375 - Icons should not be displayed in "Photos" tab.
Icons should not be displayed in "Photos" tab.
Status: RESOLVED OBSOLETE
Product: gnome-photos
Classification: Applications
Component: general
3.15.x
Other All
: Normal normal
: ---
Assigned To: GNOME photos maintainer(s)
GNOME photos maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-03-01 18:03 UTC by Siddha Ganju
Modified: 2018-01-23 09:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Icons should not be displayed in RECENT tab. (85.13 KB, image/png)
2015-03-01 18:03 UTC, Siddha Ganju
  Details
Patch for the bug. (1.69 KB, patch)
2015-12-11 17:03 UTC, Avaneesh
needs-work Details | Review
search-type-manager: Filter small images (2.61 KB, patch)
2016-10-28 20:49 UTC, Kartikeya Sharma
needs-work Details | Review
image with dimensions 66x768 px (38.66 KB, image/png)
2016-11-01 17:06 UTC, Kartikeya Sharma
  Details

Description Siddha Ganju 2015-03-01 18:03:17 UTC
Created attachment 298220 [details]
Icons should not be displayed in RECENT tab.

Icons of files should not be displayed in the RECENT tab. The RECENT tab displays all the photos that the tracker locates in the directories it checks. IMHO, this should not be the case and the icon images if present should be recognized, probably by checking the size of the images, because the icons have predefined standard sizes as 16x16, 32x32, 48x48, 256x256.
Comment 1 Avaneesh 2015-12-11 17:03:05 UTC
Created attachment 317222 [details] [review]
Patch for the bug.

The patch modifies src/photos-search-type-manager.c to include a filter for Photos tab. Filtering of icons is based on dimensions (greater than 128 pixels). But the Recent tab still shows the icons.
Comment 2 Kartikeya Sharma 2016-10-28 20:49:08 UTC
Created attachment 338746 [details] [review]
search-type-manager: Filter small images

This patch filters all the images with size less then 128 x 128 px.

I have introduced 2 filters one has a condition for filtering small images
and other one is just logical and of gif_filter and small_images_filter
I used small_images_and_gif_filter because the base_manager_add_object
was otherwise adding the images without letting small_images_filter
to filter the small images so logical and with gif_filter fixed the problem.
Comment 3 Kartikeya Sharma 2016-11-01 17:06:48 UTC
Created attachment 338903 [details]
image with dimensions 66x768 px

should the image attached be shown in the photos tab? it is small on one side but larger on the other. or should only the icons with given dimensions above be removed and everything else be shown? 
I saw in the roadmap that "Small images (eg., icons) should be hidden from the Photos view." linked to this bug. 
what is the exact standard for these small images?
Comment 4 Umang Jain 2018-01-09 02:00:24 UTC
Review of attachment 317222 [details] [review]:

Please look at the latest version of the source code : src/photos-search-type-manager.c
before working on the comments.

::: src/photos-search-type-manager.c
@@ +91,1 @@
 

Nitpick: Variable naming. icon_filter suits better?

@@ +101,1 @@
 

We try not to hard value (128, 128) unless it's really inevitable. Plus this will allow high-res but still "icons" show in the overview mode? Did you talk to Designers and maintainers about how to choose the filtering criteria?

You might wanna drop in #photos and #gnome-design on GIMPNet

@@ +126,3 @@
                                              _("Photos"),
                                              "?urn a nmm:Photo",
+                                             photos_filter);

Leaking photos_filter. Should have been freed with g_free
Comment 5 Umang Jain 2018-01-09 02:06:47 UTC
Review of attachment 338746 [details] [review]:

See previous comment.

::: src/photos-search-type-manager.c
@@ +104,2 @@
   gif_filter = g_strdup ("nie:mimeType(?urn) != 'image/gif'");
+  small_image_filter= g_strdup_printf("((nfo:height(?urn) > %d) && (nfo:width(?urn) > %d))",128,128);

mis-aligned "=", space after "g_strdup_printf"

@@ +104,3 @@
   gif_filter = g_strdup ("nie:mimeType(?urn) != 'image/gif'");
+  small_image_filter= g_strdup_printf("((nfo:height(?urn) > %d) && (nfo:width(?urn) > %d))",128,128);
+  small_image_and_gif_filter=g_strdup_printf("%s && %s", gif_filter, small_image_filter);

space around "="

@@ +139,3 @@
                                              _("Photos"),
                                              "?urn a nmm:Photo",
+                                             small_image_and_gif_filter);

Please see latest version of src/photos-search-type-manager.c
Comment 6 GNOME Infrastructure Team 2018-01-23 09:47:08 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-photos/issues/25.