Image¶
-
class
pdfpug.modules.Image(path, **kwargs)¶ Embed picturesque visuals using the
Imageclass with different stylesParameters: - path (
str) – Absolute path of image - size (Optional[Size]) – Size of image
- style (Optional[ImageStyle]) – Render style
- layout (Optional[ImageLayout]) – Layout options
Instantiating an image is as simple as the following,
>>> from pdfpug.modules import Image >>> img = Image('/home/johndoe/image.png', size=Size.small, style=ImageStyle.rounded)
- path (
-
class
pdfpug.modules.Images(images, **kwargs)¶ Embed a row of images together using the
Imagesclass.Parameters: - images (
List[Image]) – Group of images - size (Optional[Size]) – Common size of group images
>>> from pdfpug.modules import Image, Images >>> images = Images( ... [ ... Image('/home/johndoe/image1.png'), ... Image('/home/johndoe/image2.png'), ... Image('/home/johndoe/image3.png') ... ], ... size=Size.small ... )
- images (
-
class
pdfpug.common.ImageStyle¶ Enum Image Style
-
avatar= 'avatar'¶ Image which appears inline as an avatar (circular image)
-
rounded= 'rounded'¶ Image with rounded edges
-
circular= 'circular'¶ Crop image into a circular shape. The input image should have the same width and height for this style to work.
-


