camera.getMetadata
فراداده فایل را با توجه به URI آن برمی گرداند. هدر تصویر فیلدهای Exif و XMP را فهرست می کند. این دستور در سطح 2 API منسوخ شد.
پارامترها
- fileUri: URI فایل مورد نظر. تولیدکنندگان تصمیم می گیرند که از URI های مطلق یا نسبی استفاده کنند. مشتریان ممکن است این را به عنوان یک شناسه غیر شفاف تلقی کنند.
نتایج
- ابرداده: Exif (شامل اطلاعات GPS)، Photo Sphere XMP در فرمت JSON. شامل تصویر یا تصویر کوچک نمی شود.
خطاها
- missingParameter:
fileUri
مشخص نشده است. - invalidParameterName: نام پارامتر ورودی شناسایی نشده است.
- invalidParameterValue: پارامتر ورودی شناسایی می شود، اما مقدار آن نامعتبر است. به عنوان مثال،
fileUri
وجود ندارد، یا نوع داده آن نادرست است.
دستور I/O |
---|
ورودی فرمان | { "parameters": { "fileUri": "file URI" } } |
خروجی فرمان | { "results": { "exif": { ... "ImageWidth": 2000, "ImageLength": 1000, ... }, "xmp": { "ProjectionType": "equirectangular", "UsePanoramaViewer": true, ... } } } |
خروجی فرمان (خطا) | { "error": { "code": "invalidParameterValue", "message": "Parameter fileUri doesn't exist." } } |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-11-08 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-11-08 بهوقت ساعت هماهنگ جهانی."],[[["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"]]