|
CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
|
Classes | |
| struct | ImageRegion |
| Represents a rectangular region of an image and its pixel data. More... | |
Concepts | |
| concept | ImageLike |
| A concept that constrains a type to behave like an image container. | |
| concept | MutableImageLike |
| Extends ImageLike to require read/write access. | |
Typedefs | |
| using | ImageDim = std::size_t |
| Type for image dimensions (width, height). | |
| using | ImageChan = std::uint8_t |
| Type for channel count. | |
| using | ImageCoord = std::int32_t |
| Type for pixel coordinates (x, y). | |
| using | ImageSize = std::size_t |
| Type for data size (element count). | |
Enumerations | |
| enum class | PixelFormat : std::uint8_t { RGBA_F32 , RGB_F32 } |
| Enumerates the supported pixel storage formats in memory. More... | |
| enum class | MemoryType : std::uint8_t { CPU_RAM = 0 , GPU_MEMORY = 1 } |
| Enum representing the memory type where image data is stored. More... | |
Functions | |
| constexpr std::uint8_t | getChannelCount (PixelFormat pf) noexcept |
| Returns the number of channels for a given PixelFormat. | |
| constexpr std::size_t | getPixelSizeInBytes (PixelFormat fmt) noexcept |
| Returns the size in bytes of a single pixel for a given PixelFormat. | |
| using CaptureMoment::Core::Common::ImageDim = std::size_t |
Type for image dimensions (width, height).
Native word size, supports large images (64MP+).
Definition at line 20 of file image_types.h.
| using CaptureMoment::Core::Common::ImageChan = std::uint8_t |
Type for channel count.
Max 4 channels (RGBA), uint8_t sufficient.
Definition at line 26 of file image_types.h.
| using CaptureMoment::Core::Common::ImageCoord = std::int32_t |
Type for pixel coordinates (x, y).
Signed for negative offsets in region calculations.
Definition at line 32 of file image_types.h.
| using CaptureMoment::Core::Common::ImageSize = std::size_t |
Type for data size (element count).
Large images require size_t.
Definition at line 38 of file image_types.h.
|
strong |
Enumerates the supported pixel storage formats in memory.
This enum defines the layout and data type for individual pixels. It specifies both the number of channels (e.g., RGB vs. RGBA) and the data type used for each channel's value (e.g., float32 vs. uint8).
| Enumerator | |
|---|---|
| RGBA_F32 | 4-channel format: Red, Green, Blue, Alpha in 32-bit float. Each pixel is stored as 4 consecutive
ImageRegion region;
region.format = PixelFormat::RGBA_F32;
region.channels = 4;
@ RGBA_F32 4-channel format: Red, Green, Blue, Alpha in 32-bit float. Represents a rectangular region of an image and its pixel data. Definition image_region.h:47 constexpr ImageChan channels() const noexcept Definition image_region.h:199 constexpr PixelFormat format() const noexcept Definition image_region.h:205 |
| RGB_F32 | 3-channel format: Red, Green, Blue in 32-bit float. Each pixel is stored as 3 consecutive
|
Definition at line 38 of file pixel_format.h.
|
strong |
Enum representing the memory type where image data is stored.
Used by IWorkingImage and related classes to identify where the actual pixel data is located (in CPU RAM or GPU Memory).
Uses std::uint8_t as underlying type for memory efficiency.
| Enumerator | |
|---|---|
| CPU_RAM | Data is stored in main CPU RAM. |
| GPU_MEMORY | Data is stored in GPU memory. |
Definition at line 24 of file memory_type.h.
|
nodiscardconstexprnoexcept |
Returns the number of channels for a given PixelFormat.
| pf | The pixel format. |
Definition at line 74 of file pixel_format.h.
References RGB_F32, and RGBA_F32.
Referenced by getPixelSizeInBytes().
|
nodiscardconstexprnoexcept |
Returns the size in bytes of a single pixel for a given PixelFormat.
| fmt | The pixel format. |
Definition at line 92 of file pixel_format.h.
References getChannelCount().