Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Creates an image with text attribution (`message`).

:param message: the message to put in the image
:param size: the size of the output image
:param format: the output format of the image
:param inverse: if true, write white text
:param transparent: if True and the `format` supports it,
                    return a transparent image
:rtype: `ImageSource`

        def attribution_image(message, size, image_opts=None, inverse=False):
    """
    Creates an image with text attribution (`message`).

    :param message: the message to put in the image
    :param size: the size of the output image
    :param format: the output format of the image
    :param inverse: if true, write white text
    :param transparent: if True and the `format` supports it,
                        return a transparent image
    :rtype: `ImageSource`
    """
    if image_opts is None:
        image_opts = ImageOptions(transparent=True)
    aimg = AttributionImage(message, image_opts=image_opts,
                            inverse=inverse)
    return aimg.draw(size=size)
        


src/m/a/MapProxy-1.6.0/mapproxy/service/wms.py   MapProxy(Download)
from mapproxy.image.merge import concat_legends, LayerMerger
from mapproxy.image.opts import ImageOptions
from mapproxy.image.message import attribution_image, message_image
from mapproxy.layer import BlankImage, MapQuery, InfoQuery, LegendQuery, MapError, LimitedLayer
from mapproxy.layer import MapBBOXError, merge_layer_extents, merge_layer_res_ranges
 
        if self.attribution and not query.tiled_only:
            merger.add(attribution_image(self.attribution['text'], params.size))
        img_opts = self.image_formats[params.format_mime_type].copy()
        img_opts.bgcolor = params.bgcolor

src/m/a/mapproxy-HEAD/mapproxy/service/wms.py   mapproxy(Download)
from mapproxy.image.merge import concat_legends, LayerMerger
from mapproxy.image.opts import ImageOptions
from mapproxy.image.message import attribution_image, message_image
from mapproxy.layer import BlankImage, MapQuery, InfoQuery, LegendQuery, MapError, LimitedLayer
from mapproxy.layer import MapBBOXError, merge_layer_extents, merge_layer_res_ranges
 
        if self.attribution and not query.tiled_only:
            merger.add(attribution_image(self.attribution['text'], query.size))
        img_opts = self.image_formats[params.format_mime_type].copy()
        img_opts.bgcolor = params.bgcolor