Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Betty documentation
Logo
Betty documentation
  • Installation
    • Installation via pip
    • Installation via pipx
    • Installation via Poetry
    • Installation from source
  • Usage
    • Ancestry
      • Citation
      • Dates
      • Enclosure
      • Event
      • Event Type
      • File
      • File reference
      • Link
      • Media Type
      • Note
      • Person
      • Person Name
      • Place
      • Place Name
      • Presence
      • Presence Role
      • Privacy
      • Source
    • Asset Management
    • The command line
    • Application configuration
    • Environment variables
    • Extensions
      • The Cotton Candy extension
      • The Deriver extension
      • The Gramps extension
      • The HTTP API Documentation extension
      • The Maps extension
      • The Nginx extension
      • The Privatizer extension
      • The Trees extension
      • The Wikipedia extension
    • GEDCOM
    • npm
    • Projects
      • Project configuration
    • Templating
      • Filters
      • Globals
      • Tests
    • Translations
  • Development
    • Developing Betty itself
      • Installing a development environment
      • Testing Betty’s source code
      • Working on Betty’s translations
    • Event dispatching
    • Plugins
      • CLI command plugins
      • Entity type plugins
      • Event type plugins
      • Extension plugins
      • Presence role plugins
    • Testing your source code
  • API Documentation
  • About
    • Contributing to Betty
    • Copyright & license
Back to top
View this page

betty.image module¶

Manipulate images.

betty.image.resize_cover(original_image: Image, resize_size: tuple[int, None] | tuple[None, int] | tuple[int, int], *, focus: tuple[int, int, int, int] | None = None) → Image[source]¶

Resize an image to cover an area.

Parameters:

focus – An area within the image of which as much as possible should be part of the resized image.

Copyright © Bart Feenstra and contributors
Made with Sphinx and @pradyunsg's Furo
On this page
  • betty.image module
    • resize_cover()