Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • G gajim-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 52
    • Issues 52
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gajimgajim
  • gajim-plugins
  • Merge requests
  • !53
The source project of this merge request has been removed.

[UrlImagePreview] Add PNG and GIF thumbnails to url_image_preview.py

Merged Daniel Brötzmann requested to merge (removed):UrlImagePreviewPNG-GIF into master Dec 15, 2017
  • Overview 7
  • Pipelines 0
  • Changes 1

Thumbnails created by the UrlImagePreview plugin are stored as JPEG, regardless which file extension is appended (e.g. picture.png has a JPEG header instead of a PNG header).

To avoid this, we can create thumbnails with the corresponding file format, chosen by file extension. This fixes #234 (closed) , I guess? Also, I set the JPG quality to 95, as 100 does not provide better quality but bigger filesizes.

Additionally, for animated content (GIF) there is only a static thumbnail displaying the first frame. Resizing of GIF-files with im.thumbnail will create a thumbnail containing the first frame only. Therefore, this commit passes the GIF-file without resizing.

To allow inline animated GIF-files in the chat window, loader.get_animation has to be used in the process of updating the images in the textview.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: UrlImagePreviewPNG-GIF