11#ifndef __BE_IMAGE_NETPBM__
12#define __BE_IMAGE_NETPBM__
36 ASCIIPortableBitmap = 1,
37 ASCIIPortableGraymap = 2,
38 ASCIIPortablePixmap = 3,
39 BinaryPortableBitmap = 4,
40 BinaryPortableGraymap = 5,
41 BinaryPortablePixmap = 6
47 const std::string &identifier =
"",
53 const std::string &identifier =
"",
177 size_t sizeOfValue = 0);
205 const uint8_t *bitmap,
241 const uint8_t *ASCIIBuf,
242 uint64_t ASCIIBufSize,
270 const uint8_t *bitmap,
290 uint32_t _maxColorValue;
292 uint64_t _headerLength;
301 BE_Image_NetPBM_Kind_EnumToStringMap);
BE_FRAMEWORK_ENUMERATION_DECLARATIONS(BiometricEvaluation::Image::NetPBM::Kind, BE_Image_NetPBM_Kind_EnumToStringMap)
Represent attributes common to all images.
static void defaultStatusCallback(const Framework::Status &status)
Default handling of statuses sent from image processing libraries.
std::function< void(const Framework::Status)> statusCallback_t
static void skipLine(const uint8_t *data, size_t dataSize, size_t &offset)
Skip an entire line of input, placing offset at the first character after the newline.
static void skipComment(const uint8_t *data, size_t dataSize, size_t &offset)
Skip a block of comments in input.
static bool isNetPBM(const uint8_t *data, uint64_t size)
Whether or not data is a netpbm image.
static Memory::uint8Array BinaryBitmapTo8Bit(const uint8_t *bitmap, uint64_t bitmapSize, uint32_t width, uint32_t height)
Convert an binary bitmap (1-bit depth) buffer into an 8-bit depth buffer.
NetPBM(const uint8_t *data, const uint64_t size, const std::string &identifier="", const statusCallback_t &statusCallback=Image::defaultStatusCallback)
static Memory::uint8Array ASCIIBitmapTo8Bit(const uint8_t *bitmap, uint64_t bitmapSize, uint32_t width, uint32_t height)
Convert an ASCII bitmap (1-bit depth) buffer into an 8-bit depth buffer.
Memory::uint8Array getRawGrayscaleData(uint8_t depth) const
Accessor for decompressed data in grayscale.
static std::string getNextValue(const uint8_t *data, size_t dataSize, size_t &offset, size_t sizeOfValue=0)
Obtain the next space-separated value from data, beginning at offset.
NetPBM(const Memory::uint8Array &data, const std::string &identifier="", const statusCallback_t &statusCallback=Image::defaultStatusCallback)
static Memory::uint8Array ASCIIPixmapToBinaryPixmap(const uint8_t *ASCIIBuf, uint64_t ASCIIBufSize, uint32_t width, uint32_t height, uint8_t depth, uint32_t maxColor)
Convert an ASCII pixel map buffer into a binary pixel map buffer.
Memory::uint8Array getRawData() const
Accessor for the raw image data.
This software was developed at the National Institute of Standards and Technology (NIST) by employees...