camera.getImage
URI를 고려하여 원본 크기 또는 조정된 이미지를 반환합니다. 입력 매개변수에는 다음이 포함됩니다.
합니다. 이는 Content-Type: image/jpeg
를 반환해야 하는 유일한 명령어입니다.
다른 모든 명령어는 Content-Type: application/json;charset=utf-8
을 반환합니다.
이 명령어는 API 수준 2에서 지원 중단되었습니다.
매개변수
- fileUri: 타겟 파일의 URI입니다. 제조업체에서 사용 여부 결정
절대 또는 상대 URI입니다. 클라이언트는 이를 불투명 식별자로 처리할 수 있습니다.
- maxSize: (선택사항) 요청된 이미지의 최대 크기입니다.
max(scaledimage_width, scaledimage_height).
maxSize
가 생략되었거나 더 큰 경우
전체 크기 이미지가 반환됩니다.
결과
- content: 상응하는 이미지 바이너리 데이터 (예: 크기 조정됨)
이미지 헤더의 메타데이터입니다.
오류
- missingParameter: 필수
fileUri
가 지정되지 않았습니다.
- invalidParameterName: 입력 매개변수 이름을 인식할 수 없습니다.
- invalidParameterValue: 입력 매개변수 이름은 인식되지만 해당 값이 입력됩니다.
가 유효하지 않습니다. 예를 들어
fileUri
값이 존재하지 않고 데이터 유형이 올바르지 않습니다.
또는 maxSize
의 데이터 유형이 잘못되었습니다.
명령어 I/O |
명령어 입력 |
{ "parameters": { "fileUri": "file URI", "maxSize": 400 } } |
명령어 결과 |
Image binary data |
명령어 출력 (오류) |
{ "error": { "code": "invalidParameterValue", "message": "Parameter fileUri doesn't exist." } } |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-08-21(UTC)
[null,null,["최종 업데이트: 2024-08-21(UTC)"],[[["Returns a full-size or scaled image based on its URI, with optional resizing using the `maxSize` parameter."],["This command is deprecated and was replaced in API level 2, primarily used for retrieving image data in JPEG format."],["Input requires a `fileUri` parameter, while `maxSize` is optional for scaling the output image."],["Output provides the image as binary data, including relevant metadata, or an error message in JSON format."],["Potential errors involve missing or invalid parameters, such as an incorrect `fileUri` or `maxSize` value."]]],["The command retrieves an image (full-size or scaled) via its URI, with `fileUri` being mandatory and `maxSize` (maximum dimension) being optional. If `maxSize` is omitted or exceeds the image's full size, the full-size image is provided. Output is image binary data, with `Content-Type: image/jpeg`. Errors include missing/invalid parameter or invalid value. It was deprecated in API level 2. Example input involves `fileUri` and `maxSize`. Example error is related to an invalid `fileUri`.\n"]]