{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.stfform.at/stf.image.schema.json",
	"title": "STF Image",
	"description": "Represents an encoded image.",
	"stfImplementations": {
		"blender": {
			"representingType": "bpy.types.Image",
			"link": "https://codeberg.org/stf_format/stf_blender/src/branch/master/stfblender/stf_resources/stf/stf_image/stf_image.py"
		},
		"godot": {
			"representingType": "Image",
			"link": "https://codeberg.org/stf_format/stf_godot/src/branch/master/addons/stf_godot/resources/stf/STF_Image.gd"
		},
		"unity": {
			"representingType": "STF_Image Resource",
			"link": "https://codeberg.org/stf_format/stf_unity/src/branch/master/Runtime/Resources/Resources_STF/STF_Image.cs",
			"extra_links": {
				"Default Processor": "https://codeberg.org/stf_format/stf_unity/src/branch/master/Runtime/Processors/Processors_STF/STF_Image_Processor.cs"
			}
		},
		"three.js": {
			"representingType": "Object3D",
			"link": "https://codeberg.org/stf_format/stf_js/src/branch/master/stf_threejs/src/stf_resources/stf_image.ts"
		}
	},
	"allOf": [{ "$ref": "https://schema.stfform.at/stf.schema.json#/$defs/stf_data_resource" }],
	"properties": {
		"type": {
			"const": "stf.image"
		},
		"format": {
			"type": "string",
			"description": "The file format of the image. Well supported are `png` and `jpeg`."
		},
		"data_type": {
			"enum": ["color", "non_color"],
			"description": "Type of data the image describes."
		},
		"buffer": {
			"$ref": "https://schema.stfform.at/stf.schema.json#buffer_ref",
			"description": "Buffer reference. The data of the buffer must represent an image file."
		}
	},
	"required": [
		"type",
		"format",
		"buffer"
	],
	"additionalProperties": false,
	"examples": [
		{
			"type": "stf.image",
			"name": "BodyBaseColor.png",
			"format": "png",
			"data_type": "color",
			"referenced_buffers": [
				"470a0380-1bac-40c3-aa1d-cac52345da58"
			],
			"buffer": 0,
			"components": [
				"6db664cf-a4ba-4dd5-8845-477ca01f24d0"
			]
		}
	]
}