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:56
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
A container for Images managed by the ImageFactory. Provides convenience access functions without act...
Definition ImageFactory.h:124
const Vector< 2, uint04 > & size() const
const Buffer< uint01 > & getUncompressed() const
String compressionFormat() const
const String m_id
Definition ImageFactory.h:138
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:137
ImageData(const ImageData &data)
The core class for reading/writing and storing images in an optimized way.
Definition ImageFactory.h:75
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:114
Dictionary< String, Buffer< uint01 > > m_image_decompressed_data
Definition ImageFactory.h:111
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:109
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:110
Dictionary< String, String > m_image_compression_format
Definition ImageFactory.h:113
Dictionary< String, ImageFormatHandler * > m_format_handlers
Definition ImageFactory.h:116
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:112
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:115
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:261
Used to lock a particular variable for reading. Any number of readers can be created when no write lo...
Definition RWLock.h:91
The core String class for the NDEVR API.
Definition String.h:69
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
Used to lock a particular variable for writing. Only one write lock can be created when no read locks...
Definition RWLock.h:115
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149
Defines a DataStream for Image reading or writing.
Definition ImageFactory.h:48
uint01 * compressed_data
Definition ImageFactory.h:51
Vector< 2, uint04 > image_size
Definition ImageFactory.h:56
fltp08 quality
Definition ImageFactory.h:57
File file
Definition ImageFactory.h:49
uint01 * bitmap_data
Definition ImageFactory.h:53
Vector< 2, uint04 > bitmap_offset
Definition ImageFactory.h:55
bool has_alpha
Definition ImageFactory.h:58
uint04 bitmap_line_span
Definition ImageFactory.h:54
uint04 compressed_length
Definition ImageFactory.h:52
String format
Definition ImageFactory.h:50