34#include <NDEVR/Dictionary.h>
35#include <NDEVR/String.h>
36#include <NDEVR/LABColor.h>
37#include <NDEVR/File.h>
38#include <NDEVR/RWLock.h>
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition Dictionary.h:48
Definition ImageFactory.h:108
const Vector< 2, uint04 > & size() const
const Buffer< uint01 > & getUncompressed() const
String compressionFormat() const
const String m_id
Definition ImageFactory.h:122
ImageData(ImageData &&data) noexcept
const File & file() const
ImageData(const String &id, ImageFactory &image_factory)
Time modifiedTime() const
const Buffer< uint01 > & getCompressed(const String &default_image_format) const
ImageFactory & m_image_factory
Definition ImageFactory.h:121
ImageData(const ImageData &data)
Definition ImageFactory.h:63
void copyImage(const String &image_id_destination, const String &image_id_source)
static void WriteToFile(const uint01 *data, Vector< 2, uint04 > size, uint04 px_size, const File &file, fltp08 write_quality=1.0)
const Buffer< uint01 > & getCompressed(const String &image_id, const String &default_extension=".png")
void readFromFile(const String &image_id)
Dictionary< String, File > m_image_files
Definition ImageFactory.h:102
Dictionary< String, Buffer< uint01 > > m_image_decompressed_data
Definition ImageFactory.h:99
static ImageFactory & DefaultFactory()
bool canRead(const File &file)
void addImageUncompressed(const String &image_id, const Buffer< uint01 > &uncompressed, const Vector< 2, uint04 > &size, bool clear_other)
const Vector< 2, uint04 > & getSize(const String &image_id)
Dictionary< String, Time > m_image_modified_time
Definition ImageFactory.h:97
void convertColorTheme(const Buffer< std::pair< LABColor, LABColor >, uint04, ObjectAllocator< true > > &color, String &image, bool preserve_brightness, bool preserve_alpha)
void convertDirectory(const File &directory, const String &from_ext, const String &to_ext)
Dictionary< String, Vector< 2, uint04 > > m_image_size
Definition ImageFactory.h:98
Dictionary< String, String > m_image_compression_format
Definition ImageFactory.h:101
Dictionary< String, ImageFormatHandler * > m_format_handlers
Definition ImageFactory.h:104
void addImageCompressed(const String &image_id, const Buffer< uint01 > &compressed, bool clear_other)
void writeToFile(const String &image_id, const File &file)
void readFromCompressed(const String &image_id)
bool hasImage(const String &image_id)
Time modifiedTime(const String &image_id) const
const File & getFile(const String &image_id)
virtual void getSupportedFormats(Buffer< FileFormat, uint04, ObjectAllocator< false > > &formats) const
bool hasTransparency(const String &image_id)
void addImageUncompressed(const String &image_id, const Buffer< uint01 > &uncompressed, bool clear_other)
void setWriteQuality(fltp08 quality)
void addImageCompressed(const String &image_id, const String &extension, const Buffer< uint01 > &compressed, bool clear_other)
Dictionary< String, Buffer< uint01 > > m_image_compressed_data
Definition ImageFactory.h:100
String optimizedWriteFileName(const String &image_id, const Buffer< String > &optional_extenstions=Buffer< String >())
void readFromBMP(const String &image_id)
void readFromFile(const String &image_id, String format_extension)
String compressionFormat(const String &image_id)
void addImageFile(const String &image_id, const File &file, bool clear_other)
const Buffer< uint01 > & getUncompressed(const String &image_id)
Dictionary< String, bool > m_has_transparency
Definition ImageFactory.h:103
static void ReadJPG(const uint01 *input, uint04 input_length, uint01 *buffer, bool has_alpha, uint04 dst_line_span, const Vector< 2, uint04 > &offset)
const Buffer< uint01 > & getCompressedInFormat(const String &image_id, const String &default_extension)
Definition MemoryManager.h:283
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:98
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
Definition ImageFactory.h:44
uint01 * compressed_data
Definition ImageFactory.h:47
Vector< 2, uint04 > image_size
Definition ImageFactory.h:52
fltp08 quality
Definition ImageFactory.h:53
File file
Definition ImageFactory.h:45
uint01 * bitmap_data
Definition ImageFactory.h:49
Vector< 2, uint04 > bitmap_offset
Definition ImageFactory.h:51
bool has_alpha
Definition ImageFactory.h:54
uint04 bitmap_line_span
Definition ImageFactory.h:50
uint04 compressed_length
Definition ImageFactory.h:48
String format
Definition ImageFactory.h:46