Images own pixel data. A typed image binds its pixel format at compile time: Argb32Image, Rgb32Image, Rgb16Image, and Yuv12Image are specializations of BasicImage with a concrete format type. Their views expose the matching concrete pixel type, such as Argb32Pixel. Use a typed image when its format is known by the calling code.
Image and ImageF select their format at runtime through the abstract ImageFormat interface. Image exposes Pixel<Color>. ImageF is a ColorF lens on the same runtime ImageFormat, not a float storage format, and exposes Pixel<ColorF>. Use these images when the format is chosen by an image decoder, caller, or other runtime input. The generic pixels use the selected ImageFormat for their pixel operations.
Both image families provide the same non-owning views. Use view() to access a rectangular region, pixelView() to traverse individual pixels, and lineView() to traverse rows as pixel spans. Each view preserves the source image's compile-time or runtime pixel behavior and does not copy pixel data.
Pixel objects refer to a position in an image or view. Their copy-assignment operator is deleted to prevent accidentally rebinding a position. Call reset() to bind a pixel to another position. Write a color with its color assignment operator or assign().
Add a format by deriving it from ImageFormat, implementing its pixel storage operations, and providing the matching concrete pixel types and ImageTraits specialization. The runtime image API then uses the format through ImageFormat, while typed images use it through BasicImage.
Classes | |
| class | Argb32Image |
| Image storing pixels in ARGB-32 format. More... | |
| class | Rgb32Image |
| Image storing pixels in premultiplied ARGB-32 format. More... | |