Files
VRCX/docs/screenshotMetadata-schema.json
Natsumi 1e4b427254 Screenshot metadata dialog (#490)
* docs: Add json schema for screenshot metadata

* feat(.NET): Add function to open a file and read screenshot metadata to AppApi

* refactor(.NET): Check initial file dialog directory before set

Paranoia is fun

* refactor(.NET): Stop reading entire png files into memory to check 8 bytes

* refactor(.NET): Handle endianness and keyword encoding correctly for screenshots

* docs: Add xmldocs and some comments to parts of the screenshot helper

* screenshot metadata dialog

* screenshot metadata dialog 1

* fix: file dialog open bool not resetting properly

* screenshot metadata dialog 2

* fix: Stop png parser from dying on bad files

Parser would keep reading past a file's IEND chunk, and it finally found one that had junk data past IEND. It died. This fixes that.

It also encapsulates the Read function in a try/catch so VRCX doesn't crash if it fails due to a corrupted file.

* fix: buggy carousel transition animation

---------

Co-authored-by: Teacup <git@teadev.xyz>
2023-02-19 10:14:29 +13:00

72 lines
2.3 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$comment": "This schema is primarily for any developers that want to interface with this outside of VRCX and want an easy way to view/generate the format without crawling through the codebase. It's also for me a couple months from now when I come back to this and have no idea what was done."
"title": "VRChat Screenshot JSON",
"description": "JSON object attached by VRCX to screenshot files taken by users in-game.",
"type": "object",
"required": ["application", "version", "author", "world", "players"],
"properties": {
"application": {
"type": "string",
"default": "VRCX"
"description": "Name of the application writing to the screenshot. Should be VRCX."
},
"version": {
"type": "integer",
"description": "The version of this schema. If the format changes, this number should change."
"const": 1
},
"author": {
"type": "object",
"description": "The details of the user that took the picture.",
"required": ["id", "displayName"],
"properties": {
"id": {
"type": "string",
"description": "The ID of the user."
},
"displayName": {
"type": "string",
"description": "The display name of the user."
}
}
},
"world": {
"type": "object",
"description": "Information about the world the picture was taken in.",
"required": ["id", "name", "instanceId"],
"properties": {
"id": {
"type": "string",
"description": "The ID of the world."
},
"name": {
"type": "string",
"description": "The name of the world."
},
"instanceId": {
"type": "string",
"description": "The full ID of the game instance."
}
}
},
"players": {
"type": "array",
"description": "A list of players in the world at the time the picture was taken.",
"items": {
"type": "object",
"required": ["id", "displayName"],
"properties": {
"id": {
"type": "string",
"description": "The ID of the player in the world."
},
"displayName": {
"type": "string",
"description": "The display name of the player in the world."
}
}
}
}
}
}