Image provider that can load JPEG (.jpg) files. More...

#include <jpeg_provider.h>

Static Public Member Functions

static PixelBuffer load (const std::string &filename, const FileSystem &fs, bool srgb=false)
 Called to load an image with this provider type.
 
static PixelBuffer load (const std::string &fullname, bool srgb=false)
 
static PixelBuffer load (IODevice &file, bool srgb=false)
 
static void save (PixelBuffer buffer, const std::string &filename, FileSystem &fs, int quality=85)
 Save the given PixelBuffer into a JPEG.
 
static void save (PixelBuffer buffer, const std::string &fullname, int quality=85)
 
static void save (PixelBuffer buffer, IODevice &file, int quality=85)
 

Detailed Description

Image provider that can load JPEG (.jpg) files.

Member Function Documentation

◆ load() [1/3]

static PixelBuffer clan::JPEGProvider::load ( const std::string & filename,
const FileSystem & fs,
bool srgb = false )
static

Called to load an image with this provider type.

Parameters
filenameName of the file to load.
directoryDirectory that file name is relative to.

◆ load() [2/3]

static PixelBuffer clan::JPEGProvider::load ( const std::string & fullname,
bool srgb = false )
static

◆ load() [3/3]

static PixelBuffer clan::JPEGProvider::load ( IODevice & file,
bool srgb = false )
static

◆ save() [1/3]

static void clan::JPEGProvider::save ( PixelBuffer buffer,
const std::string & filename,
FileSystem & fs,
int quality = 85 )
static

Save the given PixelBuffer into a JPEG.

Parameters
bufferThe PixelBuffer to save, format doesn't matter its converted if needed
filenameFile name of JPEG.
directoryDirectory that the file name is relative to.
qualityThe quality level of the JPEG (0-100), 100 being best quality.

◆ save() [2/3]

static void clan::JPEGProvider::save ( PixelBuffer buffer,
const std::string & fullname,
int quality = 85 )
static

◆ save() [3/3]

static void clan::JPEGProvider::save ( PixelBuffer buffer,
IODevice & file,
int quality = 85 )
static

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