Stay organized with collections Save and categorize content based on your preferences.
google.appengine.api.images package SummaryImage manipulation API.
App Engine provides the ability to manipulate image data using a dedicated Images service. The Images service can resize, rotate, flip, and crop images; it can composite multiple images into a single image; and it can convert image data between several formats. It can also enhance photographs using a predefined algorithm. The API can also provide information about an image, such as its format, width, height, and a histogram of color values.
ContentsBases: exceptions.Exception
Base error class for this module.
Bases: object
Image object to manipulate.
Checks that a parameter is an integer within the specified range.
Crops the image.
The four arguments are the scaling numbers that describe the bounding box that will crop the image. The upper left point of the bounding box will be at (left_x*image_width
, top_y*image_height
), and the lower right point will be at (right_x*image_width
, bottom_y*image_height
).
left_x – Float value between 0.0 and 1.0, inclusive.
top_y – Float value between 0.0 and 1.0, inclusive.
right_x – Float value between 0.0 and 1.0, inclusive.
bottom_y – Float value between 0.0 and 1.0, inclusive.
TypeError – If the arguments are not of type float.
BadRequestError – When the bounding box values are invalid or if MAX_TRANSFORMS_PER_REQUEST
transforms have already been requested for this image.
Performs transformations on a given image.
You can only execute one transformation per image per execute_transforms()
call.
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 for JPEG and WEBP quality control.
parse_source_metadata – When True
, the metadata (EXIF) of the source image is parsed before any transformations. The results can be retrieved via Image.get_original_metadata
.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, transparent pixels will be substituted for the specified color, which must be 32-bit RGB format.
rpc – A UserRPC object.
A string of the image data after the transformations have been performed on it.
RaisesBadRequestError – When the request specifications are invalid.
NotImageError – When the image data given is not an image.
BadImageError – When the image data given is corrupt.
LargeImageError – When the image data given is too large to process.
InvalidBlobKeyError – When the blob key provided is invalid.
TransformationError – When an error occurs during image manipulation.
AccessDeniedError – When the blob key refers to a Google Storage object, and the application does not have permission to access the object.
ObjectNotFoundError – When the blob key refers to an object that no longer exists.
Error – All other error conditions.
Asynchronously performs transformations on a given image.
Parametersoutput_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 for JPEG & WEBP quality control.
parse_source_metadata – When True
, the metadata (EXIF) of the source image is parsed before any transformations. The results can be retrieved via Image.get_original_metadata
.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
rpc – A UserRPC object.
A UserRPC object.
RaisesBadRequestError – When the request specifications are invalid.
NotImageError – When the image data given is not an image.
BadImageError – When the image data given is corrupt.
LargeImageError – When the image data given is too large to process.
InvalidBlobKeyError – When the blob key provided is invalid.
TransformationError – When an error occurs during image manipulation.
AccessDeniedError – When the blob key refers to a Google Storage object, and the application does not have permission to access the object.
ValueError – When transparent_substitution_rgb
is not an integer.
Error – All other error conditions.
Retrieves the format of the image.
Retrieves the height of the image.
Calculates the histogram of the image.
Parametersrpc – A UserRPC object.
Returns3 256-element lists containing the number of occurences of each value of each color in the order RGB. You can learn more about color histograms at Wikipedia.
RaisesNotImageError – When the image data supplied is not an image.
BadImageError – When the image data supplied is corrupt.
LargeImageError – When the image data supplied is too large to process.
Error – All other error conditions.
Asynchronously calculates the histogram of the image.
Parametersrpc – An optional UserRPC object.
ReturnsA UserRPC object.
Return typerpc
RaisesNotImageError – When the image data supplied is not an image.
BadImageError – When the image data supplied is corrupt.
LargeImageError – When the image data supplied is too large to process.
Error – All other error conditions.
Flips the image horizontally.
RaisesBadRequestError – If MAX_TRANSFORMS_PER_REQUEST
transforms have already been requested on the image.
Automatically adjusts the image’s contrast and color levels.
This is similar to the “I’m Feeling Lucky” button in Picasa.
RaisesBadRequestError – If MAX_TRANSFORMS_PER_REQUEST
transforms have already been requested for this image.
Resizes the image, maintaining the aspect ratio.
If both width
and height
are specified, the more restricting of the two values will be used when the image is resized. The maximum dimension allowed for both width
and height
is 4000 pixels.
If both width
and height
are specified, and crop_to_fit
is True
, the less restricting of the two values will be used when the image is resized, and the image will be cropped to fit the specified size. In this case, the center of cropping can be adjusted by crop_offset_x
and crop_offset_y
.
width – Integer of the width in pixels to change the image width to.
height – Integer of the height in pixels to change the image height to.
crop_to_fit – If True
, and both width
and height
are specified, the image is cropped after it is resized to fit the specified dimensions.
crop_offset_x – Float value between 0.0 and 1.0. 0 is left, and 1 is right. The default value is 0.5, or the center of the image.
crop_offset_y – Float value between 0.0 and 1.0. 0 is top, and 1 is bottom. The default value is 0.5, or the center of the image.
allow_stretch – If True
, and both width
and height
are specified, the image is stretched to fit the resize dimensions without maintaining the aspect ratio.
TypeError – When width
or height
is not an integer or long type.
BadRequestError – When the height or width is invalid, or if MAX_TRANSFORMS_PER_REQUEST
transforms have already been requested on this image.
Rotates an image a given number of degrees clockwise.
Parametersdegrees – Integer value of the number of degrees that an image must be rotated. This value must be a multiple of 90.
RaisesTypeError – When degrees
is not an integer or long type.
BadRequestError – When the degrees
value is invalid or if MAX_TRANSFORMS_PER_REQUEST
transforms have already been requested.
Sets a flag to correct the image orientation based on image metadata.
EXIF metadata within the image may contain a parameter that indicates its proper orientation. This value can equal 1 through 8, inclusive. Setting the orientation to 1 means that the image is in its “normal” orientation, i.e., it should be viewed as it is stored. Normally, this orientation value has no effect on the behavior of the transformations. However, if you call this function with the correct_orientation
argument, any orientation specified in the EXIF metadata will be corrected during the first transformation.
If correct_orientation
is specified, but the image is already in portrait orientation, i.e., “taller” than it is “wide,” no corrections will be made, since the camera has likely already corrected it.
Whether the correction was requested or not, the orientation value in the transformed image is always cleared to indicate that no additional corrections of the returned image’s orientation is necessary.
Parameterscorrect_orientation – A value from ORIENTATION_CORRECTION_TYPE
.
BadRequestError – If the correct_orientation
value is invalid.
Flips the image vertically.
RaisesBadRequestError – If MAX_TRANSFORMS_PER_REQUEST
transforms have already been requested on the image.
Retrieves the width of the image.
Composites one or more images onto a canvas.
Parametersinputs –
a list of tuples (image_data
, x_offset
, y_offset
, opacity
, anchor
) where:
String of the source image data.
X offset, in pixels from the anchor position.
Y offset, in piyels from the anchor position.
Opacity of the image, specified as a float in range [0.0, 1.0]
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.
A string that contains the image data of the composited image.
RaisesTypeError – 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.
Asynchronously composites one or more images onto a canvas.
Parametersinputs –
A list of tuples (image_data
, x_offset
, y_offset
, opacity
, anchor
), where:
String of the source image data.
X offset, in pixels from the anchor position.
Y offset, in piyels from the anchor position.
Opacity of the image, specified as a float in range [0.0, 1.0]
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 for JPEG quality control.
rpc – Optional UserRPC object.
A UserRPC object.
RaisesTypeError – If width
, height
, color
, x_offset
, or y_offset
are not an 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 the anchor is invalid.
Creates an RPC object for use with the Images API.
Parametersdeadline – Optional deadline in seconds for the operation; the default value is a system-specific deadline (typically 5 seconds).
callback – Optional callable to invoke on completion.
An apiproxy_stub_map.UserRPC
object specialized for this service.
Crops the image.
The four arguments are the scaling numbers that describe the bounding box that will crop the image. The upper left point of the bounding box will be at (left_x*image_width
, top_y*image_height
), and the lower right point will be at (right_x*image_width
, bottom_y*image_height
).
image_data – String of the source image data.
left_x – Float value between 0.0 and 1.0, inclusive.
top_y – Float value between 0.0 and 1.0, inclusive.
right_x – Float value between 0.0 and 1.0, inclusive.
bottom_y – Float value between 0.0 and 1.0, inclusive.
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.
correct_orientation – A value from ORIENTATION_CORRECTION_TYPE
to indicate if orientation correction should be performed during the transformation.
rpc – An optional UserRPC object.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, then transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
Raw image data of the transformed image.
RaisesTypeError – If the arguments are not of type float.
BadRequestError – If the bounding box values are invalid.
Error – All other errors. See Image.ExecuteTransforms
for more details.
Asynchronously crops the given image.
The four arguments are the scaling numbers that describe the bounding box that will crop the image. The upper left point of the bounding box will be at (left_x*image_width
, top_y*image_height
), and the lower right point will be at (right_x*image_width
, bottom_y*image_height
).
image_data – String of the source image data.
left_x – Float value between 0.0 and 1.0, inclusive.
top_y – Float value between 0.0 and 1.0, inclusive.
right_x – Float value between 0.0 and 1.0, inclusive.
bottom_y – Float value between 0.0 and 1.0, inclusive.
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.
correct_orientation – A value from ORIENTATION_CORRECTION_TYPE
to indicate if orientation correction should be performed during the transformation.
rpc – An optional UserRPC object.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, then transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
A UserRPC object; call get_result()
to complete the RPC and obtain the crop result.
TypeError – If the args are not of type float.
BadRequestError – When the bounding box values are invalid.
Error – All other errors. See Image.ExecuteTransforms
for more details.
Deletes a serving URL created for blob_key
using get_serving_url
.
blob_key – The BlobKey
, BlobInfo
, string, or Unicode representation of the BlobKey of a blob with an existing URL that you want to delete.
rpc – Optional UserRPC object.
BlobKeyRequiredError – If no blob_key
was specified.
InvalidBlobKeyError – If the blob_key
supplied was invalid.
Error – There was a generic error deleting the serving URL.
Deletes a serving URL created using get_serving_url - async version.
Parametersblob_key – BlobKey
, BlobInfo
, string, or unicode representation of the BlobKey of a blob with an existing URL that you want to delete.
rpc – Optional UserRPC object.
A UserRPC object.
RaisesBlobKeyRequiredError – If no blob_key
was specified.
InvalidBlobKeyError – If the blob_key
supplied was invalid.
Error – There was a generic error deleting the serving URL.
Obtains a URL that will serve the underlying image.
This URL is served by a high-performance dynamic image serving infrastructure. This URL format also allows dynamic resizing and cropping with certain restrictions. To dynamically resize and crop, specify size and crop arguments, or simply append options to the end of the default URL obtained via this call.
Example:
get_serving_url -> "http://lh3.ggpht.com/SomeCharactersGoesHere"
To get a 32-pixel-sized version (aspect-ratio preserved), append =s32
to the URL:
http://lh3.ggpht.com/SomeCharactersGoesHere=s32
To get a 32-pixel cropped version, append =s32-c
:
http://lh3.ggpht.com/SomeCharactersGoesHere=s32-c
Available sizes are any integer in the range [0, 1600] and is available as IMG_SERVING_SIZES_LIMIT
.
blob_key – The BlobKey
, BlobInfo
, string, or Unicode representation of BlobKey
of the blob whose URL you require.
size – Integer of the size of resulting images.
crop – Boolean value. True
requests a cropped image, while False
requests a resized image.
secure_url – Boolean value. True
requests a https
URL, while False
requests a http
URL.
filename – The file name of a Google Storage object whose URL you require.
rpc – Optional UserRPC object.
A URL string.
RaisesBlobKeyRequiredError – If a blob key was not specified in the constructor.
UnsupportedSizeError – If you specified an invalid size parameter.
BadRequestError – If crop
and size
are present in the wrong combination, or if blob_key
and filename
are both specified.
TypeError – If secure_url
is not a boolean type.
AccessDeniedError – If blob_key
refers to a Google Storage object and the application does not have permission to access the object.
ObjectNotFoundError – If blob_key
refers to an object that doesn’t exist.
Asynchronously obtains a URL that will serve the underlying image.
This URL is served by a high-performance dynamic image serving infrastructure. This URL format also allows dynamic resizing and cropping with certain restrictions. To dynamically resize and crop, specify size and crop arguments, or simply append options to the end of the default URL obtained via this call.
Example:
get_serving_url -> "http://lh3.ggpht.com/SomeCharactersGoesHere"
To get a 32-pixel-sized version (aspect-ratio preserved), append =s32
to the URL:
http://lh3.ggpht.com/SomeCharactersGoesHere=s32
To get a 32-pixel cropped version, append =s32-c
:
http://lh3.ggpht.com/SomeCharactersGoesHere=s32-c
Available sizes are any integer in the range [0, 1600] and is available as IMG_SERVING_SIZES_LIMIT
.
blob_key – The BlobKey
, BlobInfo
, string, or Unicode representation of the BlobKey
of blob whose URL you require.
size – Integer of the size of resulting images.
crop – Boolean value. True
requests a cropped image, while False
requests a resized image.
secure_url – Boolean value. True
requests a https
URL, while False
requests a http
URL.
filename – The file name of a Google Storage object whose URL you require.
rpc – Optional UserRPC object.
A UserRPC whose result will be a string that is the serving URL.
RaisesBlobKeyRequiredError – If a blob key was not specified in the constructor.
UnsupportedSizeError – If you specified an invalid size parameter.
BadRequestError – If crop
and size
are present in the wrong combination, or if blob_key
and filename
are both specified.
TypeError – If secure_url
is not a boolean type.
AccessDeniedError – If blob_key
refers to a Google Storage object and the application does not have permission to access the object.
Calculates the histogram of the given image.
Parametersimage_data – String of the source image data.
rpc – An optional UserRPC object.
3 256-element lists containing the number of occurences of each value of each color in the order RGB.
RaisesNotImageError – If the supplied image data is not an image.
BadImageError – If the supplied image data is corrupt.
LargeImageError – If the supplied image data is too large to process.
Error – All other errors.
Calculates the histogram of the given image - async version.
Parametersimage_data – String of the source image data.
rpc – An optional UserRPC object.
An UserRPC object.
RaisesNotImageError – If the supplied image data is not an image.
BadImageError – If the supplied image data is corrupt.
LargeImageError – If the supplied image data is too large to process.
Error – All other errors.
Flips the image horizontally.
Parametersimage_data – String of the source image data.
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.
correct_orientation – A value from ORIENTATION_CORRECTION_TYPE
to indicate if orientation correction should be performed during the transformation.
rpc – An optional UserRPC object.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, then transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
Raw image data of the transformed image.
RaisesError – All errors. See Image.ExecuteTransforms
for more details.
Asynchronously flips the image horizontally.
Parametersimage_data – String of the source image data.
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.
correct_orientation – A value from ORIENTATION_CORRECTION_TYPE
to indicate if orientation correction should be performed during the transformation.
rpc – An optional UserRPC object.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, then transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
A UserRPC object; call get_result()
to complete the RPC and obtain the crop result.
Error – All errors. See Image.ExecuteTransforms
for more details.
Automatically adjusts image levels.
This is similar to the “I’m Feeling Lucky” button in Picasa.
Parametersimage_data – String of the source image data.
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.
correct_orientation – A value from ORIENTATION_CORRECTION_TYPE
to indicate if orientation correction should be performed during the transformation.
rpc – An optional UserRPC object.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, then transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
Raw image data of the transformed image.
RaisesError – All errors. See Image.ExecuteTransforms
for more details.
Asynchronously automatically adjusts image levels.
This is similar to the “I’m Feeling Lucky” button in Picasa.
Parametersimage_data – String of the source image data.
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.
correct_orientation – A value from ORIENTATION_CORRECTION_TYPE
to indicate if orientation correction should be performed during the transformation.
rpc – An optional UserRPC object.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, then transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
A UserRPC object.
RaisesError – All errors. See Image.ExecuteTransforms
for more details.
Resizes a given image file while maintaining the aspect ratio.
If both width
and height
are specified, the more restricting of the two values will be used when resizing the image. The maximum dimension allowed for both width and height is 4000 pixels.
If both width
and height
are specified and crop_to_fit
is True
, the less restricting of the two values will be used when resizing and the image will be cropped to fit the specified size. In this case, the center of cropping can be adjusted by crop_offset_x
and crop_offset_y
.
image_data – String of the source image data.
width – Integer of the width (in pixels) to change the image width to.
height – Integer of the height (in pixels) to change the image height to.
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.
correct_orientation – A value from ORIENTATION_CORRECTION_TYPE
to indicate if orientation correction should be performed during the transformation.
crop_to_fit – If True
, and both width
and height
are specified, the image is cropped after being resized to fit the specified dimensions.
crop_offset_x – Float value between 0.0 and 1.0. 0 is left and 1 is right. The default value is 0.5, or the center of image.
crop_offset_y – Float value between 0.0 and 1.0. 0 is top and 1 is bottom. The default value is 0.5, or the center of image.
allow_stretch – If True
, and both width
and height
are specified, the image is stretched to fit the resized dimensions without maintaining the aspect ratio.
rpc – Optional UserRPC object.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, then transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
Raw image data of the resized image.
RaisesTypeError – When width
or height
are not of integer or long type.
BadRequestError – When the specified width
or height
is invalid.
Error – All other errors. See Image.ExecuteTransforms
for more details.
Asynchronously resizes an image file, maintaining the aspect ratio.
If both width
and height
are specified, the more restricting of the two values will be used when resizing the image. The maximum dimension allowed for both width and height is 4000 pixels.
If both width
and height
are specified and crop_to_fit
is True
, the less restricting of the two values will be used when resizing and the image will be cropped to fit the specified size. In this case, the center of cropping can be adjusted by crop_offset_x
and crop_offset_y
.
image_data – String of the source image data.
width – Integer of the width in pixels to change the image width to.
height – Integer of the height in pixels to change the image height to.
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.
correct_orientation – A value from ORIENTATION_CORRECTION_TYPE
to indicate if orientation correction should be performed during the transformation.
crop_to_fit – If True
, and both width
and height
are specified, the image is cropped after being resized to fit the specified dimensions.
crop_offset_x – Float value between 0.0 and 1.0. 0 is left and 1 is right. The default value is 0.5, or the center of image.
crop_offset_y – Float value between 0.0 and 1.0. 0 is top and 1 is bottom. The default value is 0.5, or the center of image.
allow_stretch – If True
, and both width
and height
are specified, the image is stretched to fit the resized dimensions without maintaining the aspect ratio.
rpc – Optional UserRPC object.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, then transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
A UserRPC object; call get_result()
to obtain the result of the RPC.
TypeError – When width
or height
are not of integer or long type.
BadRequestError – When the specified width
or height
is invalid.
Error – All other errors. See Image.ExecuteTransforms
for more details.
Rotates an image a given number of degrees clockwise.
Parametersimage_data – String of the source image data.
degrees – A value from ROTATE_DEGREE_VALUES
.
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.
correct_orientation – A value from ORIENTATION_CORRECTION_TYPE
to indicate if orientation correction should be performed during the transformation.
rpc – An optional UserRPC object.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, then transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
Raw image data of the rotated image.
RaisesTypeError – When degrees
is not of integer or long type.
BadRequestError – When the specified degrees
value is invalid.
Error – All other errors. See Image.ExecuteTransforms
for more details.
Asynchronously rotates an image a specified number of degrees clockwise.
Parametersimage_data – String of the source image data.
degrees – A value from ROTATE_DEGREE_VALUES
.
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.
correct_orientation – A value from ORIENTATION_CORRECTION_TYPE
to indicate if orientation correction should be performed during the transformation.
rpc – An optional UserRPC object.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, then transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
A UserRPC object; call get_result()
to complete the RPC and obtain the crop result.
TypeError – When degrees
is not of integer or long type.
BadRequestError – When the specified degrees
value is invalid.
Error – All other errors. See Image.ExecuteTransforms
for more details.
Flips the image vertically.
Parametersimage_data – String of the source image data.
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.
correct_orientation – A value from ORIENTATION_CORRECTION_TYPE
to indicate if orientation correction should be performed during the transformation.
rpc – An optional UserRPC object.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, then transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
Raw image data of the transformed image.
RaisesError – All errors. See Image.ExecuteTransforms
for more details.
Asynchronously flips the image vertically.
Parametersimage_data – String of the source image data.
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.
correct_orientation – A value from ORIENTATION_CORRECTION_TYPE
to indicate if orientation correction should be performed during the transformation.
rpc – An optional UserRPC object.
transparent_substitution_rgb – When transparent pixels are not supported in the destination image format, then transparent pixels will be substituted for the specified color, which must be in 32-bit RGB format.
A UserRPC object; call get_result()
to complete the RPC and obtain the crop result.
Error – All errors. See Image.ExecuteTransforms
for more details.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[[["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 2025-06-16 UTC."],[[["The `google.appengine.api.images` package provides an API for manipulating image data, offering features like resizing, rotating, flipping, cropping, and compositing multiple images."],["The API allows conversion between several image formats and can enhance photographs using a predefined algorithm, and retrieve information like format, width, height, and a color histogram."],["The `Image` class within this package is used to create image objects for manipulation, including methods for cropping, resizing, rotating, and flipping, as well as adjusting contrast and color levels automatically."],["The service supports both synchronous and asynchronous operations, allowing for efficient image manipulation and retrieval of image data and metadata."],["Several exceptions are defined in this module to handle issues such as invalid parameters, corrupt or unrecognised image data, permission issues, or if the image is too large to be processed."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4