CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
working_image_cpu.h
Go to the documentation of this file.
1
14#pragma once
15
17
18namespace CaptureMoment::Core {
19
20namespace ImageProcessing {
21
34public:
35
37 WorkingImageCPU() = default;
38
42 virtual ~WorkingImageCPU() = default;
43
44 [[nodiscard]] bool isValid() const override;
45 [[nodiscard]] Common::MemoryType getMemoryType() const override { return Common::MemoryType::CPU_RAM; };
46
47 [[nodiscard]] std::expected<std::unique_ptr<Common::ImageRegion>, ErrorHandling::CoreError>
48 downsample(Common::ImageDim target_width, Common::ImageDim target_height) override;
49
55 [[nodiscard]] std::expected<std::unique_ptr<Common::ImageRegion>, ErrorHandling::CoreError>
56 getFullResImage() override;
57};
58
59} // namespace ImageProcessing
60
61} // namespace CaptureMoment::Core
Abstract interface representing an image used as a working buffer.
Class extending IWorkingImageHardware for CPU-specific implementations. This class defines the base c...
Common::MemoryType getMemoryType() const override
Gets the memory type where data resides.
std::expected< std::unique_ptr< Common::ImageRegion >, ErrorHandling::CoreError > getFullResImage() override
Exports current internal image data to a new CPU-based ImageRegion..
virtual ~WorkingImageCPU()=default
Virtual destructor.
std::expected< std::unique_ptr< Common::ImageRegion >, ErrorHandling::CoreError > downsample(Common::ImageDim target_width, Common::ImageDim target_height) override
Exports a downscaled version of the image directly from GPU.
bool isValid() const override
Checks if the image data is valid.
Abstract interface representing an image used as a working buffer, abstracting hardware location.
std::size_t ImageDim
Type for image dimensions (width, height).
Definition image_types.h:20
MemoryType
Enum representing the memory type where image data is stored.
Definition memory_type.h:24
@ CPU_RAM
Data is stored in main CPU RAM.
@ ImageProcessing
Errors related to Image Processing, GPU, or Memory.
CoreError
Enumeration of all error codes for CaptureMoment Core.
Definition core_error.h:36
Manages the lifecycle of a single IWorkingImage instance.
CaptureMoment — footer