#include <PpmFile.h>
Ppm is a portable pixel format, one of the simplest image formats out there. See https://en.wikipedia.org/wiki/Netpbm#PPM_example
◆ 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
-
ppmData | the data loaded from a ppm file |
buffer | output image data |
size | output image dimensions |
format | output 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
-
buffer | image data |
size | image dimensions |
format | only 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:
- Gems/Atom/Utils/Code/Include/Atom/Utils/PpmFile.h