NDEVR
API Documentation
PNGImageFactory.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/ImageFactory.h>
4namespace NDEVR
5{
10 {
11 public:
17 virtual UUID id() const override { return UUID::CreateUUID("PNG Image Factory"); }
21 virtual void getSupportedFormats(AlocatingAlignedBuffer<FileFormat, 64>& formats, bool is_read) const override;
25 virtual bool getMetaData(ImageCacheData&) override;
29 virtual bool getUncompressed(ImageCacheData&) override;
34 virtual bool getCompressed(ImageCacheData&, StringView) override;
38 virtual bool hasTransparency(ImageCacheData&)override;
42 virtual bool getSize(ImageCacheData&) override;
47 virtual StringView compressionFormat(const uint01* data, uint04 size) override;
51 virtual bool canRead(const File& format) const override;
55 virtual bool canRead(StringView format) const override;
59 virtual bool canWrite(StringView format) const override;
60 };
61}
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Definition File.h:53
Can be used to add functionality to the ImageFactory.
An ImageFormatHandler implementation for reading and writing PNG image files.
virtual bool canRead(StringView format) const override
Checks whether the given format string can be read by this handler.
virtual bool getUncompressed(ImageCacheData &) override
Reads uncompressed pixel data from a PNG image.
virtual bool canWrite(StringView format) const override
Checks whether the given format string can be written by this handler.
virtual void getSupportedFormats(AlocatingAlignedBuffer< FileFormat, 64 > &formats, bool is_read) const override
Populates the buffer with supported image formats.
virtual bool getCompressed(ImageCacheData &, StringView) override
Reads compressed data from a PNG image.
static PNGImageFactory & DefaultFactory()
Returns the singleton default PNGImageFactory instance.
virtual bool getSize(ImageCacheData &) override
Reads the image dimensions from a PNG file.
virtual bool getMetaData(ImageCacheData &) override
Reads metadata from a PNG image.
virtual bool hasTransparency(ImageCacheData &) override
Checks whether the PNG image has an alpha transparency channel.
virtual bool canRead(const File &format) const override
Checks whether the given file can be read by this handler.
virtual StringView compressionFormat(const uint01 *data, uint04 size) override
Determines the compression format from raw image data.
virtual UUID id() const override
Returns the unique identifier for this factory.
The core String View class for the NDEVR API.
Definition StringView.h:58
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
static UUID CreateUUID()
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Holds cached image data including compressed and decompressed pixel buffers, file references,...