Class PPMImage#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Type#

Class Documentation#

class PPMImage : public TRAP::Image#

Public Functions

explicit PPMImage(std::filesystem::path filepath)#

Constructor.

Parameters:

filepath – File path of the image to load.

PPMImage(const PPMImage&) noexcept = default#

Copy constructor.

PPMImage &operator=(const PPMImage&) noexcept = default#

Copy assignment operator.

PPMImage(PPMImage&&) noexcept = default#

Move constructor.

PPMImage &operator=(PPMImage&&) noexcept = default#

Move assignment operator.

~PPMImage() override = default#

Destructor.

virtual constexpr std::span<const u8> GetPixelData() const noexcept override#

Retrieve the raw pixel data of the image.

Returns:

Raw pixel data.

Public Static Functions

static void Save(const Image *img, const std::filesystem::path &filepath)#

Save an TRAP::Image as a Portable Pixmap (PPM) file.

Parameters:
  • imgImage to save.

  • filepath – File path to save the image to.