11 for (
int img_x = 0; img_x <
width_; img_x++) {
12 for (
int img_y = 0; img_y <
height_; img_y++) {
23 for (
int img_x = 0; img_x <
width_; img_x++) {
24 for (
int img_y = 0; img_y <
height_; img_y++) {
26 if (color.w >= 0x80) {
33 for (
int img_x = 0; img_x <
width_; img_x++) {
34 for (
int img_y = 0; img_y <
height_; img_y++) {
36 if (color.w >= 0x80) {
43 for (
int img_x = 0; img_x <
width_; img_x++) {
44 for (
int img_y = 0; img_y <
height_; img_y++) {
46 if (color.w >= 0x80) {
53 for (
int img_x = 0; img_x <
width_; img_x++) {
54 for (
int img_y = 0; img_y <
height_; img_y++) {
56 if (color.w >= 0x80) {
65 if (x < 0 || x >= this->
width_ || y < 0 || y >= this->
height_)
67 switch (this->
type_) {
83 const uint32_t width_8 = ((this->
width_ + 7u) / 8u) * 8u;
84 const uint32_t pos = x + y * width_8;
88 const uint32_t pos = (x + y * this->
width_) * 4;
93 const uint32_t pos = (x + y * this->
width_) * 3;
106 const uint32_t pos = (x + y * this->
width_) * 2;
109 auto r = (rgb565 & 0xF800) >> 11;
110 auto g = (rgb565 & 0x07E0) >> 5;
111 auto b = rgb565 & 0x001F;
112 Color color =
Color((r << 3) | (r >> 2), (g << 2) | (g >> 4), (b << 3) | (b >> 2));
122 const uint32_t pos = (x + y * this->
width_);
125 return Color(gray, gray, gray, alpha);
ImageType get_type() const
Color get_rgb24_pixel_(int x, int y) const
bool get_binary_pixel_(int x, int y) const
Color get_pixel(int x, int y, Color color_on=display::COLOR_ON, Color color_off=display::COLOR_OFF) const
Color get_grayscale_pixel_(int x, int y) const
int get_width() const override
Color get_rgb565_pixel_(int x, int y) const
const uint8_t * data_start_
uint8_t progmem_read_byte(const uint8_t *addr)
int get_height() const override
void draw(int x, int y, display::Display *display, Color color_on, Color color_off) override
void draw_pixel_at(int x, int y)
Set a single pixel at the specified coordinates to default color.
Implementation of SPI Controller mode.
Image(const uint8_t *data_start, int width, int height, ImageType type)
Color get_rgba_pixel_(int x, int y) const