Coverage for gws-app/gws/lib/image/__init__.py: 100%

2 statements  

« prev     ^ index     » next       coverage.py v7.17.0, created at 2026-10-23 20:06 +0200

1"""Raster images. 

2 

3- ``core``: ``Image``, the implementation of ``gws.Image`` on top of a PIL image, and the factories 

4 that create images (exported by this package). 

5- ``format``: predefined image formats, formats from configuration, MIME type selection. 

6- ``util``: thumbnails, cached 1x1 pixels, QR codes, PIL drawing helpers. 

7 

8Example:: 

9 

10 img = gws.lib.image.from_size((256, 256)) 

11 img.compose(gws.lib.image.from_path('/data/overlay.png'), opacity=0.5) 

12 png = img.to_bytes(gws.lib.mime.PNG, {'mode': 'P'}) 

13""" 

14 

15from .core import * 

16from . import format, util