forked from arduino-libraries/ArduinoGraphics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImage.h
40 lines (32 loc) · 733 Bytes
/
Image.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
/*
This file is part of the ArduinoGraphics library.
Copyright (c) 2025 Arduino SA. All rights reserved.
*/
#ifndef _IMAGE_H
#define _IMAGE_H
#include <stdint.h>
enum {
ENCODING_NONE = -1,
ENCODING_RGB,
ENCODING_RGB24,
ENCODING_RGB16
};
class Image {
public:
Image();
Image(int encoding, const uint8_t* data, int width, int height);
Image(int encoding, const uint16_t* data, int width, int height);
Image(int encoding, const uint32_t* data, int width, int height);
virtual ~Image();
int encoding() const;
const uint8_t* data() const;
int width() const;
int height() const;
virtual operator bool() const;
private:
int _encoding;
const uint8_t* _data;
int _width;
int _height;
};
#endif