מצלמה.getMetadata
מחזירה את המטא-נתונים של הקובץ בהתאם ל-URI שלו. כותרת התמונה
מפרטת את השדות Exif ו-XMP. הפקודה הזו הוצאה משימוש ברמת API 2.
פרמטרים
- fileUri: ה-URI של קובץ היעד. היצרנים מחליטים אם
כדי להשתמש ב-URI מוחלטים או יחסיים. לקוחות יכולים להתייחס למזהה הזה בתור מזהה אטום.
תוצאות
- מטא-נתונים: תצוגת Exif (כולל פרטי GPS), תמונה פנורמית ב-360° XMP ב-
בפורמט JSON. לא כולל תמונה או תמונה ממוזערת.
שגיאות
- missingParameter:
fileUri
לא צוין.
- INVALIDParameterName: השם של פרמטר הקלט לא מזוהה.
- invalidParameterValue: פרמטר הקלט מזוהה, אבל
הערך לא חוקי; לדוגמה, השדה
fileUri
לא קיים, או שהנתונים שלו לא קיימים
שגוי.
Command 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 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-08-21 (שעון UTC).
[null,null,["עדכון אחרון: 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"]]