class ffw::JpgSaver

Class List > ffw :: JpgSaver

Inherits the following classes: ffw::ImageWriter

Public Functions

Type Name
JpgSaver (const std::string & path, int width, int height, ffw::ImageType type, int quality = 100, int mips = 1)
JpgSaver (const JpgSaver & other) = delete
JpgSaver (JpgSaver && other)
void swap (JpgSaver & other)
JpgSaver & operator= (const JpgSaver & other) = delete
JpgSaver & operator= (JpgSaver && other)
virtual ~JpgSaver ()
virtual size_t writeRow (const void * src) override
Writes a row of pixels.
virtual bool writeFooter () override
Writes the footer.
virtual void close () override

Public Functions Documentation

function JpgSaver (1/3)

ffw::JpgSaver::JpgSaver (
    const std::string & path,
    int width,
    int height,
    ffw::ImageType type,
    int quality = 100,
    int mips = 1
)

function JpgSaver (2/3)

ffw::JpgSaver::JpgSaver (
    const JpgSaver & other
) = delete

function JpgSaver (3/3)

ffw::JpgSaver::JpgSaver (
    JpgSaver && other
)

function swap

void ffw::JpgSaver::swap (
    JpgSaver & other
)

function operator= (1/2)

JpgSaver & ffw::JpgSaver::operator= (
    const JpgSaver & other
) = delete

function operator= (2/2)

JpgSaver & ffw::JpgSaver::operator= (
    JpgSaver && other
)

function ~JpgSaver

virtual ffw::JpgSaver::~JpgSaver ()

function writeRow

virtual size_t ffw::JpgSaver::writeRow (
    const void * src
)

Writes a row of pixels.

Parameters:

  • src Where to read pixels from

The src must contain an entire row of pixels. Use writer->getStrideSize() to determine the size of the row needed in number of bytes.

Implements ImageWriter::writeRow

function writeFooter

virtual bool ffw::JpgSaver::writeFooter ()

Writes the footer.

Note:

This is needed to be called at the end of writing all pixels. Not doing so could lead to invalid image file.

Implements ImageWriter::writeFooter

function close

virtual void ffw::JpgSaver::close ()

Implements ImageWriter::close


The documentation for this class was generated from the following file: include/ffw/media/jpgsaver.h