Skip to main content

This package is used to write justified text to images.

Project description

Justipy

This package allows you to draw justified text to images.

Usage example:

from PIL import Image
from Justipy.Justipy import Justipy

longtext = "Lorem ipsum vehicula himenaeos turpis odio sollicitudin quis amet suspendisse nisl, libero taciti ante interdum sollicitudin vestibulum felis mi hac, egestas fames luctus turpis imperdiet consectetur est gravida sem. malesuada maecenas vivamus consectetur donec diam sapien, in erat curae phasellus potenti, sed primis velit sem cursus. molestie ultrices tempus arcu viverra eleifend primis malesuada convallis ante accumsan, pulvinar conubia mollis at pellentesque consectetur ut dapibus sagittis integer nam, tempus orci elementum curabitur id rhoncus tempus velit elit. mollis vestibulum curabitur laoreet augue faucibus nullam a amet justo lorem, varius placerat magna pulvinar aptent quis porttitor metus lacus, diam etiam auctor nulla sagittis metus urna phasellus vitae."

im = Image.new('RGB', (1000, 500))
im_with_text = Justipy(im,
		              longtext,
		              tl_corner = [100, 75],
		              max_width = 800,
		              fontsize = 24,
		              font = 'calibri.ttf',
		              fontcolor = (255,255,255),
		              line_space = 32,
		              paragraph_spaces = 8)

im_with_text.show()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Justipy-0.0.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

Justipy-0.0.2-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page