Skip to content

Combine many Image components into one struct ImageFormat #7051

@emilk

Description

@emilk

See #6386 (comment) for more

archetype Image {
	buffer: ImageBuffer,
	format: ImageFormat
}

archetype SegmentationImage {
	buffer: ImageBuffer,
	format: ImageFormat,
}

archetype DepthImage {
	// Required:
	buffer: ImageBuffer,
	format: ImageFormat,
	
	meter: Optional<…>,
	colormap: Optional<…>,
}

component ImageFormat {
	datatype ImageFormat;
}

datatype ImageFormat {
	width: uint,
	height: uint,

	pixel_format: Optional<PixelFormat>, // Optional or not?
	color_model: Option<ColorModel>, // used if pixel_format = ARRAY
	datatype: Option<ChannelDatatype> // used if pixel_format = ARRAY
}

component enum PixelFormat {
    /// See `ColorModel` and `ChannelDatatype` instead
	ARRAY,

	RGB_565,
	RGBA_8888,
	NV12,
	YUY2,
	…
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions