8 #ifndef META_OCEAN_IO_IMAGE_IMAGE_H
9 #define META_OCEAN_IO_IMAGE_IMAGE_H
41 #if defined(_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
42 #ifdef USE_OCEAN_IO_IMAGE_EXPORT
43 #define OCEAN_IO_IMAGE_EXPORT __declspec(dllexport)
45 #define OCEAN_IO_IMAGE_EXPORT __declspec(dllimport)
48 #define OCEAN_IO_IMAGE_EXPORT
66 OCEAN_IO_IMAGE_EXPORT
Frame decodeImage(
const void* buffer,
const size_t size,
const std::string& imageBufferTypeIn = std::string(), std::string* imageBufferTypeOut =
nullptr);
129 static bool encodeImage(
const Frame& frame,
const std::string& imageType, std::vector<uint8_t>& buffer,
const bool allowConversion,
bool* hasBeenConverted =
nullptr,
const Properties& properties =
Properties());
153 static bool encodeImage(
const Frame&,
const std::string&, std::vector<uint8_t>&,
const float) =
delete;
166 static bool encodeImage(
const Frame&,
const std::string&, std::vector<uint8_t>&,
const float) =
delete;
This class implements Ocean's image class.
Definition: Frame.h:1792
This class provides functions for image encoding and decoding which will increase binary size when us...
Definition: io/image/Image.h:111
static bool writeImage(const Frame &, const std::string &, const float)=delete
Disabled function to prevent wrong usage.
static bool encodeImage(const Frame &, const std::string &, std::vector< uint8_t > &, const float)=delete
Disabled function to prevent wrong usage.
OCEAN_IO_IMAGE_EXPORT Frame decodeImage(const void *buffer, const size_t size, const std::string &imageBufferTypeIn=std::string(), std::string *imageBufferTypeOut=nullptr)
Decodes (reads/loads) an image from a given binary buffer.
static bool encodeImage(const Frame &frame, const std::string &imageType, std::vector< uint8_t > &buffer, const bool allowConversion, bool *hasBeenConverted=nullptr, const Properties &properties=Properties())
Encodes (writes) a given frame as image (with specified image type) to a resulting buffer.
OCEAN_IO_IMAGE_EXPORT Frame readImage(const std::string &filename)
Reads/loads an image from a specified file.
static bool writeImage(const Frame &frame, const std::string &filename, const bool allowConversion, bool *hasBeenConverted=nullptr, const Properties &properties=Properties())
Writes a given frame to a specified file.
OCEAN_IO_IMAGE_EXPORT bool encodeImage(const Frame &frame, const std::string &imageType, std::vector< uint8_t > &buffer, const Properties &properties=Properties())
Encodes (writes) a given frame as image (with specified image type) to a resulting buffer.
OCEAN_IO_IMAGE_EXPORT bool writeImage(const Frame &frame, const std::string &filename, const Properties &properties=Properties())
Writes a given frame to a specified file.
Media::Image::Properties Properties
Re-definition of Media::Image::Properties.
Definition: io/image/Image.h:54
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15