Composites one or more images onto a canvas.
google.appengine.api.images.composite(
inputs, width, height, color=0, output_encoding=PNG, quality=None, rpc=None
)
Args |
inputs
|
a list of tuples (image_data , x_offset , y_offset , opacity ,
anchor ) where: - image_data String of the source image data. -
x_offset X offset, in pixels from the anchor position. - y_offset Y
offset, in piyels from the anchor position. - opacity Opacity of the
image, specified as a float in range [0.0, 1.0] - anchor Anchoring
point from ANCHOR_POINTS . The anchor point of the image is aligned
with the same anchor point of the canvas. For example, TOP_RIGHT
would place the top right corner of the image at the top right corner
of the canvas, then apply the x and y offsets.
|
width
|
Canvas width, in pixels.
|
height
|
Canvas height, in pixels.
|
color
|
Canvas background color, encoded as a 32-bit unsigned integer, where
each color channel is represented by one byte in ARGB order.
|
output_encoding
|
A value from OUTPUT_ENCODING_TYPES .
|
quality
|
A value between 1 and 100 to specify the quality of the encoding.
This value is only used to control JPEG quality.
|
rpc
|
Optional UserRPC object.
|
Returns |
A string that contains the image data of the composited image.
|
Raises |
TypeError
|
If width , height , color , x_offset or y_offset are not
of type integer or long, or if opacity is not a float.
|
BadRequestError
|
If more than MAX_TRANSFORMS_PER_REQUEST compositions
have been requested, if the canvas width or height is greater than
4000 or less than or equal to 0, if the color is invalid, if the opacity
is outside the range [0,1] for any composition option, or if the anchor
is invalid.
|