Open 3D Engine Atom Gem API Reference 24.09.2
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Utils::PpmFile Class Referencefinal

#include <PpmFile.h>

Static Public Member Functions

static AZStd::vector< uint8_t > CreatePpmFromImageBuffer (AZStd::span< const uint8_t > buffer, const RHI::Size &size, RHI::Format format)
 
static bool CreateImageBufferFromPpm (AZStd::span< const uint8_t > ppmData, AZStd::vector< uint8_t > &buffer, RHI::Size &size, RHI::Format &format)
 

Detailed Description

Ppm is a portable pixel format, one of the simplest image formats out there. See https://en.wikipedia.org/wiki/Netpbm#PPM_example

Member Function Documentation

◆ CreateImageBufferFromPpm()

static bool AZ::Utils::PpmFile::CreateImageBufferFromPpm ( AZStd::span< const uint8_t > ppmData,
AZStd::vector< uint8_t > & buffer,
RHI::Size & size,
RHI::Format & format )
static

Fills an image buffer with data from ppm file contents.

Parameters
ppmDatathe data loaded from a ppm file
bufferoutput image data
sizeoutput image dimensions
formatoutput image format
Returns
true if the data was parsed successfully

◆ CreatePpmFromImageBuffer()

static AZStd::vector< uint8_t > AZ::Utils::PpmFile::CreatePpmFromImageBuffer ( AZStd::span< const uint8_t > buffer,
const RHI::Size & size,
RHI::Format format )
static

Creates a binary ppm buffer from an image buffer. Assumes @buffer is RBGA.

Parameters
bufferimage data
sizeimage dimensions
formatonly R8G8B8A8_UNORM and B8G8R8A8_UNORM are supported at this time
Returns
the buffer is ppm binary with RGB payload (alpha is omitted as it is not supported by .ppm format)

The documentation for this class was generated from the following file: