Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • concrexit concrexit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 70
    • Issues 70
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • thaliathalia
  • concrexitconcrexit
  • Issues
  • #873
Closed
Open
Issue created May 19, 2019 by Nick van Oers@nick

Fitting 2000x430 images to 2000x430 does not work

/label bug priority: medium

One-sentence description

Fitting 2000x430 images to 2000x430 does not work

Current behaviour / Reproducing the bug

  1. Upload a 2000x430px slide to the website
  2. Check the homepage for the slide
  3. It does not load

Expected behaviour

  1. Upload a 2000x430px slide to the website
  2. Check the homepage for the slide
  3. It does load

Upstream problem

This is caused by a precision problem in Pillow. The ImageOps.fit method calculates a box to crop the image in. Since the image is the same the calculation made is as follows:

>>> 2000/430 * 430
2000.0000000000002

This is then used 2000-(2000/430 * 430) and the box has a left value that is negative causing an exception.

Edited May 19, 2019 by Sébastiaan Versteeg
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking