Project

General

Profile

bug #6970

MediaUtils.filterAndOrderMediaRepresentations perfers thumbnail MediaRepresentations over full sized

Added by Andreas Kohlbecker about 3 years ago. Updated 7 months ago.

Status:
Closed
Priority:
Highest
Category:
cdmlib
Target version:
Start date:
09/22/2017
Due date:
% Done:

100%

Severity:
normal
Found in Version:

Description

portal/taxon/{uuid}/media service only delivers a filtered media object
which only contains the thumbnail representation even if the height and width filters are not set.

In cases where no filter is set this service should return all media.


old subject: portal/taxon/{uuid}/media returns only one media object even if no filter is set


Related issues

Related to Edit - bug #6969: Use media representation which best fits the available size for taxon profile picture Closed 09/21/2017
Related to Edit - bug #6684: Use media representation which best fits the available viewport size for the Image Overlay Closed 06/01/2017
Related to Edit - bug #6683: Use best quality media representation in image viewer on media page Closed 06/01/2017
Related to Edit - feature request #8867: media list services as iiif manifest service Closed 02/28/2020
Related to Edit - bug #7093: choosing representation which best fits the available size for taxon profile picture not working in all cases Worksforme 09/21/2017

Associated revisions

Revision 02faa087 (diff)
Added by Andreas Kohlbecker about 3 years ago

fix #6969 using the size defined in settings to use the preferred representation
- also using a workaround to circumvent the problem decribed in ref #6970

Revision eaeba65c (diff)
Added by Andreas Kohlbecker 7 months ago

ref #6970 MediaUtils.filterAndOrderMediaRepresentations with improved algorithm

Revision 00145989 (diff)
Added by Andreas Kohlbecker 7 months ago

ref #6970 MediaUtils: restoring removed method

Revision 84331f40 (diff)
Added by Andreas Kohlbecker 7 months ago

ref #6970 fixing bug related to undefined values and adding test for ref #7093

Revision c0667822 (diff)
Added by Andreas Kohlbecker 7 months ago

ref #6970 fixing NPE

History

#1 Updated by Andreas Kohlbecker about 3 years ago

  • Related to bug #6969: Use media representation which best fits the available size for taxon profile picture added

#2 Updated by Andreas Kohlbecker about 3 years ago

  • Related to bug #6684: Use media representation which best fits the available viewport size for the Image Overlay added

#3 Updated by Andreas Kohlbecker 7 months ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker
  • Priority changed from New to Highest
  • Target version changed from Unassigned CDM tickets to Release 5.13

This issue is due to problems in the algorithm implemented in MediaUtils.filterAndOrderMediaRepresentations(). The same problem has already been solved for the cdm-dataportal (#6683, #6969). The better algorithm from the portal code should be used also for the cdmlib.

#4 Updated by Andreas Kohlbecker 7 months ago

  • Related to bug #6683: Use best quality media representation in image viewer on media page added

#5 Updated by Andreas Kohlbecker 7 months ago

  • Subject changed from portal/taxon/{uuid}/media returns only one media object even if no filter is set to MediaUtils.filterAndOrderMediaRepresentations perfers thumbnail MediaRepresentations over full sized
  • Description updated (diff)

#6 Updated by Andreas Kohlbecker 7 months ago

  • Category changed from cdmlib-remote to cdmlib

#7 Updated by Andreas Kohlbecker 7 months ago

#8 Updated by Andreas Müller 7 months ago

  • Status changed from New to Feedback

This ticket (by description and by old title) is about handling the "no filter" case. Not sure if the new title still covers this. As far as I understand your comment you may only improve the image selection algorithm but if no filter is set not image selection has to take place.

But ofcourse I agree that we may additionally improve the image selection algorithm if there is a better one.

#9 Updated by Andreas Kohlbecker 7 months ago

  • Status changed from Feedback to In Progress

Andreas Müller wrote:

This ticket (by description and by old title) is about handling the "no filter" case. Not sure if the new title still covers this. As far as I understand your comment you may only improve the image selection algorithm but if no filter is set not image selection has to take place.

But ofcourse I agree that we may additionally improve the image selection algorithm if there is a better one.

One of the problems is that "no filter" case is interpreted as a filter with preferred size = 0 and width = 0 which will always will return the thumbnail. So many aspects of the implementation are wrong that I refrain from mentioning all these problems only for the sake of transparency.

#10 Updated by Andreas Kohlbecker 7 months ago

  • Related to bug #7093: choosing representation which best fits the available size for taxon profile picture not working in all cases added

#11 Updated by Andreas Kohlbecker 7 months ago

  • Related to deleted (bug #7093: choosing representation which best fits the available size for taxon profile picture not working in all cases)

#12 Updated by Andreas Kohlbecker 7 months ago

  • Related to bug #7093: choosing representation which best fits the available size for taxon profile picture not working in all cases added

#13 Updated by Andreas Kohlbecker 7 months ago

  • Related to deleted (bug #7093: choosing representation which best fits the available size for taxon profile picture not working in all cases)

#14 Updated by Andreas Kohlbecker 7 months ago

  • Duplicated by bug #7093: choosing representation which best fits the available size for taxon profile picture not working in all cases added

#15 Updated by Andreas Kohlbecker 7 months ago

  • Duplicated by deleted (bug #7093: choosing representation which best fits the available size for taxon profile picture not working in all cases)

#16 Updated by Andreas Kohlbecker 7 months ago

  • Related to bug #7093: choosing representation which best fits the available size for taxon profile picture not working in all cases added

#17 Updated by Andreas Kohlbecker 7 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

#18 Updated by Andreas Kohlbecker 7 months ago

closing as all tests succeed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)