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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-09-30 UTC."],[[["The `composite` function in the `google.appengine.api.images` module allows you to merge multiple images onto a single canvas."],["You can customize the canvas size using the `width` and `height` parameters, and set a background `color` for it."],["Each image added to the composite is defined by `image_data`, along with `x_offset`, `y_offset`, `opacity`, and `anchor` parameters for precise placement and appearance."],["The `output_encoding` parameter lets you define the format of the resulting image, and `quality` can be adjusted for JPEGs."],["The function raises `TypeError` for invalid data types in the inputs, and `BadRequestError` for issues such as exceeding request limits or invalid canvas/image parameters."]]],[]]