API Documentation
Loading...
Searching...
No Matches
ImageFactory Class Reference

#include <ImageFactory.h>

Collaboration diagram for ImageFactory:
[legend]

Public Member Functions

RLock readLock ()
 
WLock writeLock ()
 
void addImageFile (const String &image_id, const File &file, bool clear_other)
 
void addImageUncompressed (const String &image_id, const Buffer< uint01 > &uncompressed, bool clear_other)
 
void addImageUncompressed (const String &image_id, const Buffer< uint01 > &uncompressed, const Vector< 2, uint04 > &size, bool clear_other)
 
void addImageCompressed (const String &image_id, const String &extension, const Buffer< uint01 > &compressed, bool clear_other)
 
void addImageCompressed (const String &image_id, const Buffer< uint01 > &compressed, bool clear_other)
 
void readFromFile (const String &image_id)
 
void readFromFile (const String &image_id, String format_extension)
 
void writeToFile (const String &image_id, const File &file)
 
void readFromCompressed (const String &image_id)
 
Time modifiedTime (const String &image_id) const
 
void convertDirectory (const File &directory, const String &from_ext, const String &to_ext)
 
bool hasImage (const String &image_id)
 
void copyImage (const String &image_id_destination, const String &image_id_source)
 
const Buffer< uint01 > & getUncompressed (const String &image_id)
 
const Buffer< uint01 > & getCompressed (const String &image_id, const String &default_extension=".png")
 
const Buffer< uint01 > & getCompressedInFormat (const String &image_id, const String &default_extension)
 
const FilegetFile (const String &image_id)
 
void convertColorTheme (const Buffer< std::pair< LABColor, LABColor >, uint04, ObjectAllocator< true > > &color, String &image, bool preserve_brightness, bool preserve_alpha)
 
String optimizedWriteFileName (const String &image_id, const Buffer< String > &optional_extenstions=Buffer< String >())
 
bool hasTransparency (const String &image_id)
 
const Vector< 2, uint04 > & getSize (const String &image_id)
 
String compressionFormat (const String &image_id)
 
bool canRead (const File &file)
 
void setWriteQuality (fltp08 quality)
 
virtual void getSupportedFormats (Buffer< FileFormat, uint04, ObjectAllocator< false > > &formats) const
 
void readFromBMP (const String &image_id)
 

Static Public Member Functions

static void WriteToFile (const uint01 *data, Vector< 2, uint04 > size, uint04 px_size, const File &file, fltp08 write_quality=1.0)
 
static ImageFactoryDefaultFactory ()
 
static void ReadJPG (const uint01 *input, uint04 input_length, uint01 *buffer, bool has_alpha, uint04 dst_line_span, const Vector< 2, uint04 > &offset)
 

Protected Attributes

Dictionary< String, Timem_image_modified_time
 
Dictionary< String, Vector< 2, uint04 > > m_image_size
 
Dictionary< String, Buffer< uint01 > > m_image_decompressed_data
 
Dictionary< String, Buffer< uint01 > > m_image_compressed_data
 
Dictionary< String, Stringm_image_compression_format
 
Dictionary< String, Filem_image_files
 
Dictionary< String, bool > m_has_transparency
 
Dictionary< String, ImageFormatHandler * > m_format_handlers
 
fltp08 m_write_quality = 1.0
 

Member Function Documentation

◆ addImageCompressed() [1/2]

void addImageCompressed ( const String & image_id,
const Buffer< uint01 > & compressed,
bool clear_other )

◆ addImageCompressed() [2/2]

void addImageCompressed ( const String & image_id,
const String & extension,
const Buffer< uint01 > & compressed,
bool clear_other )

◆ addImageFile()

void addImageFile ( const String & image_id,
const File & file,
bool clear_other )

◆ addImageUncompressed() [1/2]

void addImageUncompressed ( const String & image_id,
const Buffer< uint01 > & uncompressed,
bool clear_other )

◆ addImageUncompressed() [2/2]

void addImageUncompressed ( const String & image_id,
const Buffer< uint01 > & uncompressed,
const Vector< 2, uint04 > & size,
bool clear_other )

◆ canRead()

bool canRead ( const File & file)

◆ compressionFormat()

String compressionFormat ( const String & image_id)

◆ convertColorTheme()

void convertColorTheme ( const Buffer< std::pair< LABColor, LABColor >, uint04, ObjectAllocator< true > > & color,
String & image,
bool preserve_brightness,
bool preserve_alpha )

◆ convertDirectory()

void convertDirectory ( const File & directory,
const String & from_ext,
const String & to_ext )

◆ copyImage()

void copyImage ( const String & image_id_destination,
const String & image_id_source )

◆ DefaultFactory()

static ImageFactory & DefaultFactory ( )
static

◆ getCompressed()

const Buffer< uint01 > & getCompressed ( const String & image_id,
const String & default_extension = ".png" )

◆ getCompressedInFormat()

const Buffer< uint01 > & getCompressedInFormat ( const String & image_id,
const String & default_extension )

◆ getFile()

const File & getFile ( const String & image_id)

◆ getSize()

const Vector< 2, uint04 > & getSize ( const String & image_id)

◆ getSupportedFormats()

virtual void getSupportedFormats ( Buffer< FileFormat, uint04, ObjectAllocator< false > > & formats) const
virtual

◆ getUncompressed()

const Buffer< uint01 > & getUncompressed ( const String & image_id)

◆ hasImage()

bool hasImage ( const String & image_id)

◆ hasTransparency()

bool hasTransparency ( const String & image_id)

◆ modifiedTime()

Time modifiedTime ( const String & image_id) const

◆ optimizedWriteFileName()

String optimizedWriteFileName ( const String & image_id,
const Buffer< String > & optional_extenstions = BufferString >() )

◆ readFromBMP()

void readFromBMP ( const String & image_id)

◆ readFromCompressed()

void readFromCompressed ( const String & image_id)

◆ readFromFile() [1/2]

void readFromFile ( const String & image_id)

◆ readFromFile() [2/2]

void readFromFile ( const String & image_id,
String format_extension )

◆ ReadJPG()

static void ReadJPG ( const uint01 * input,
uint04 input_length,
uint01 * buffer,
bool has_alpha,
uint04 dst_line_span,
const Vector< 2, uint04 > & offset )
static

◆ readLock()

RLock readLock ( )

◆ setWriteQuality()

void setWriteQuality ( fltp08 quality)

◆ writeLock()

WLock writeLock ( )

◆ WriteToFile()

static void WriteToFile ( const uint01 * data,
Vector< 2, uint04 > size,
uint04 px_size,
const File & file,
fltp08 write_quality = 1.0 )
static

◆ writeToFile()

void writeToFile ( const String & image_id,
const File & file )

Member Data Documentation

◆ m_format_handlers

Dictionary<String, ImageFormatHandler*> m_format_handlers
protected

◆ m_has_transparency

Dictionary<String, bool> m_has_transparency
protected

◆ m_image_compressed_data

Dictionary<String, Buffer<uint01> > m_image_compressed_data
protected

◆ m_image_compression_format

Dictionary<String, String> m_image_compression_format
protected

◆ m_image_decompressed_data

Dictionary<String, Buffer<uint01> > m_image_decompressed_data
protected

◆ m_image_files

Dictionary<String, File> m_image_files
protected

◆ m_image_modified_time

Dictionary<String, Time> m_image_modified_time
protected

◆ m_image_size

Dictionary<String, Vector<2, uint04> > m_image_size
protected

◆ m_write_quality

fltp08 m_write_quality = 1.0
protected

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