VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Gr::JpegWriter Class Reference

A write interface for libjpeg. More...

#include <grjpeg.h>

Public Member Functions

 JpegWriter (int scale=1, bool monochrome_out=false)
 Constructor.
 
 ~JpegWriter ()
 Destructor.
 
void setup (int scale, bool monochrome_out=false)
 Sets the encoding scale factor.
 
void encode (const ImageData &in, const G::Path &path_out)
 Encodes to a file.
 
void encode (const ImageData &in, std::vector< char > &out)
 Encodes to a buffer. More...
 
void encode (const ImageData &in, ImageBuffer &out)
 Encodes to an image buffer, allocated in reasonably-size chunks.
 

Detailed Description

A write interface for libjpeg.

Definition at line 144 of file grjpeg.h.

Member Function Documentation

void Gr::JpegWriter::encode ( const ImageData in,
std::vector< char > &  out 
)

Encodes to a buffer.

Use an output buffer that is one byte bigger than the expected output size in order to avoid copying.

Definition at line 717 of file grjpeg_jpeg.cpp.


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