aparat.getMetadata
Zwraca metadane pliku na podstawie jego identyfikatora URI. nagłówek obrazu,
zawiera pola Exif i XMP. To polecenie zostało wycofane w interfejsie API poziomu 2.
Parametry
- fileUri: identyfikator URI pliku docelowego. Producenci decydują, czy
do używania bezwzględnych lub względnych identyfikatorów URI. Klienci mogą traktować go jako nieprzezroczysty identyfikator.
Wyniki
- metadane:Exif (w tym dane GPS), Photo Sphere XMP;
Format JSON. Nie obejmuje obrazu ani miniatury.
Błędy
- brak parametru:
fileUri
nie został określony.
- invalidParametrName:nie udało się rozpoznać nazwy parametru wejściowego.
- invalidParameterValue::parametr wejściowe jest rozpoznawany, ale jego wartość
Wartość jest nieprawidłowa; na przykład
fileUri
nie istnieje lub jego dane
typ jest nieprawidłowy.
Polecenie I/O |
Dane wejściowe polecenia |
{ "parameters": { "fileUri": "file URI" } } |
Dane wyjściowe polecenia |
{ "results": { "exif": { ... "ImageWidth": 2000, "ImageLength": 1000, ... }, "xmp": { "ProjectionType": "equirectangular", "UsePanoramaViewer": true, ... } } } |
Dane wyjściowe polecenia (błąd) |
{ "error": { "code": "invalidParameterValue", "message": "Parameter fileUri doesn't exist." } } |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-08-21 UTC.
[null,null,["Ostatnia aktualizacja: 2024-08-21 UTC."],[[["Returns file metadata such as Exif and XMP data for a given file URI."],["This command is deprecated and was previously used in API level 2."],["Important parameters include the `fileUri`, which specifies the location of the target file."],["Potential errors encompass missing or invalid parameters, including an invalid or non-existent `fileUri`."],["The command output provides Exif and Photo Sphere XMP data in JSON format if successful."]]],["This command retrieves a file's metadata using its URI. It's deprecated in API level 2. Input requires a `fileUri`. The output provides Exif data (including GPS) and Photo Sphere XMP in JSON format, excluding the image itself. Possible errors include a missing or invalid `fileUri`, or an unrecognized parameter name. Example input shows providing a file URI, with successful output including `exif` and `xmp` fields, and error output shown when a file URI does not exist.\n"]]