-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbe_image_png.h
71 lines (61 loc) · 1.59 KB
/
be_image_png.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* This software was developed at the National Institute of Standards and
* Technology (NIST) by employees of the Federal Government in the course
* of their official duties. Pursuant to title 17 Section 105 of the
* United States Code, this software is not subject to copyright protection
* and is in the public domain. NIST assumes no responsibility whatsoever for
* its use by other parties, and makes no guarantees, expressed or implied,
* about its quality, reliability, or any other characteristic.
*/
#ifndef BE_IMAGE_PNG_H_
#define BE_IMAGE_PNG_H_
#include <be_image_image.h>
namespace BiometricEvaluation
{
namespace Image
{
/**
* @brief
* A PNG-encoded image.
*/
class PNG : public Image
{
public:
PNG(
const uint8_t *data,
const uint64_t size,
const std::string &identifier = "",
const statusCallback_t &statusCallback =
Image::defaultStatusCallback);
PNG(
const Memory::uint8Array &data,
const std::string &identifier = "",
const statusCallback_t &statusCallback =
Image::defaultStatusCallback);
~PNG() = default;
Memory::uint8Array
getRawData()
const;
Memory::uint8Array
getRawGrayscaleData(
uint8_t depth) const;
/**
* Whether or not data is a PNG image.
*
* @param[in] data
* The buffer to check.
* @param[in] size
* The size of data.
*
* @return
* true if data appears to be a PNG image, false
* otherwise
*/
static bool
isPNG(
const uint8_t *data,
uint64_t size);
};
}
}
#endif /* BE_IMAGE_PNG_H_ */