Skip to content

Preview providers should take maxX and maxY into consideration #13607

Closed

Description

@oparoz

Problem

The interface includes maX and maxY for a reason and yet, none of the providers use it.

A 5000x5000, 140MB TIFF is currently being converted to a 5000x5000 50MB PNG.
Fortunately, it will soon be possible to avoid multiple roundtrips to ImageMagick (via #13674) , but each resizing request of that 50MB PNG is still going to take some time (and waste memory) and that will only partially be fixed once #8196 is implemented.

Solution

Make sure preview providers take maxX and maxY into consideration when generating previews. With #13674 in place, each provider should only be called once.

I'm going to fix Bitmap, but the other providers should be fixed as well.

  • Bitmap
  • Image
  • Txt
  • MP3
  • SVG
  • Movie

Activity

  1. oparoz commented on Jan 23, 2015

    @oparoz
    ContributorAuthor

    Job done for all files using the bitmap preview class: #13635

  2. added this to the milestone on Apr 2, 2015
  3. reopened this on May 14, 2015
  4. oparoz commented on May 14, 2015

    @oparoz
    ContributorAuthor

    Re-opening, as the Image provider is not taking the max dimensions into consideration

  5. self-assigned this
    on May 18, 2015
  6. oparoz commented on May 18, 2015

    @oparoz
    ContributorAuthor

    Fix for all remaining providers is in #16382

  7. PVince81 commented on May 26, 2015

    @PVince81
    Contributor

    You tagged this as regression, so this worked before ?

  8. oparoz commented on May 26, 2015

    @oparoz
    ContributorAuthor

    Yes, before the max preview, each provider would be queried for each request and thus provide a preview matching the asked dimension. Since they're now only use to generate the max preview, we need to make sure those previews keep the aspect ratio of the original image.

  9. DeepDiver1975 commented on Jun 8, 2015

    @DeepDiver1975
    Contributor

    @oparoz we can close this now that #16382 is merged? THX

  10. oparoz commented on Jun 8, 2015

    @oparoz
    ContributorAuthor

    Yes, the API should now return the expected previews.

  11. DeepDiver1975 commented on Jun 8, 2015

    @DeepDiver1975
    Contributor

    Yes, the API should now return the expected previews.

    awesome - thanks @oparoz for your contribution - very much welcome!

  12. locked as resolved and limited conversation to collaborators on Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions