camera.getImage
Stay organized with collections
Save and categorize content based on your preferences.
Returns a full-size or scaled image given its URI. Input parameters include
resolution. This is the only command that should return, Content-Type: image/jpeg
.
All other commands return Content-Type: application/json;charset=utf-8
.
This command was deprecated in API level 2.
Parameters
- fileUri: URI of the target file. Manufacturers decide whether to use
absolute or relative URIs. Clients may treat this as an opaque identifier.
- maxSize: (Optional) Maximum size of the requested image;
max(scaledimage_width, scaledimage_height). If
maxSize
is omitted or larger
than the full-size image, the full-size image is returned.
Results
- content: Image binary data, including corresponding (for example, scaled)
metadata in image header.
Errors
- missingParameter: The required
fileUri
is not specified.
- invalidParameterName: An input parameter name is unrecognized.
- invalidParameterValue: The input parameter name is recognized, but its value
is invalid; for example, the
fileUri
value doesn't exist, its data type is incorrect,
or maxSize
has the wrong data type.
Command I/O |
Command Input |
{
"parameters": {
"fileUri": "file URI",
"maxSize": 400
}
} |
Command Output |
Image binary data |
Command Output (Error) |
{
"error": {
"code": "invalidParameterValue",
"message": "Parameter fileUri doesn't exist."
}
} |
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 2016-07-12 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2016-07-12 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2016-07-12 UTC."]]