Skip to content

v2.0

Latest

Choose a tag to compare

@thewizardplusplus thewizardplusplus released this 19 Oct 21:38

Refactoring and option enhancements.

Change Log

Closed issues:

  • Refactoring:
    • Support for separate options in the classes from the types.py file #25
    • Cover the project code with unit tests #26
    • Use the type hints over the project code #27
  • New features:
    • Support for working with a default font #31
    • Support for negative text rectangle coordinates (with wrapping) #32
    • Support for resizing a background image #36
  • Option enhancements:
    • Support for a default output path #29
    • Support for disabling the protection against duplicate meme texts #30
    • Store notes in the home directory by constant path #33
  • Misc.:
    • Migrate to the pyproject.toml configuration #23
    • Update the dependencies #24
    • Add the Makefile with the basic commands #34

Fixed bugs:

  • Fix the bug with the generation expression #28
  • Font descent is not taken into account when obtaining a bounding box of text #39

Features

  • a generation of memes (in PNG format);
  • a support of plain and graphic backgrounds;
  • a specification of a text rectangle;
  • a support of horizontal and vertical text alignments;
  • a read of memes texts from a file (each text is separated from another by a double newline);
  • a support single-line and multiline memes texts;
  • a protection against duplicate memes texts (it's optional);
  • a support of a watermark (it's optional);
  • meme settings:
    • background:
      • color;
      • width;
      • height;
      • image:
        • it supports the same formats as Pillow library;
        • it'll be resized to the specified size (it's optional);
      • resizing filter;
    • text:
      • font:
        • it supports only TrueType fonts;
        • it's optional (if none, the Pillow library's default font is used);
      • size;
      • color;
      • rectangle:
        • left;
        • rigth (if the value is negative, the image width is added to it);
        • top;
        • bottom (if the value is negative, the image height is added to it);
      • horizontal alignment;
      • vertical alignment;
    • watermark:
      • font (it always uses the text font);
      • text;
      • size;
      • color.

Generated Images