Skip to content

Commit 3644267

Browse files
bump dist to 2.7.7
1 parent 7c87f2a commit 3644267

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

examples/Encode_Frame_on_the_Fly/Encode_Frame_on_the_Fly.ino

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,22 @@ void reencode_frame(WiFiClient *client, camera_fb_t* frame) {
103103
// frame->buf contains RGB565 data
104104
// that is, 2 bytes per pixel
105105
//
106-
// in this test, we're going to drop the B component
106+
// in this test, we're going to do a "negative" effect
107107
// feel free to replace this with your own code
108108
for (uint16_t y = 0; y < height; y++) {
109109
uint16_t *row = (uint16_t*) (frame->buf + width * 2 * y);
110110

111111
for (uint16_t x = 0; x < width; x++) {
112112
// read pixel and parse to R, G, B components
113113
const uint16_t pixel = row[x];
114-
uint16_t r = (pixel >> 11);
114+
uint16_t r = (pixel >> 11) & 0b11111;
115115
uint16_t g = (pixel >> 5) & 0b111111;
116116
uint16_t b = pixel & 0b11111;
117117

118-
// actual work: drop B component
119-
b = 0;
118+
// actual work: make negative
119+
r = 31 - r;
120+
g = 63 - g;
121+
b = 31 - b;
120122

121123
// re-pack to RGB565
122124
row[x] = (r << 11) | (g << 5) | b;
@@ -125,6 +127,7 @@ void reencode_frame(WiFiClient *client, camera_fb_t* frame) {
125127

126128
// encode to jpeg
127129
uint8_t quality = 90;
130+
128131
frame2jpg_cb(frame, quality, &buffer_jpeg, NULL);
129132
ESP_LOGI("var_dump", "JPEG size=%d", jpeg_length);
130133
}

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "git",
77
"url": "https://github.com/eloquentarduino/EloquentEsp32cam"
88
},
9-
"version": "2.7.6",
9+
"version": "2.7.7",
1010
"authors": {
1111
"name": "Simone Salerno",
1212
"url": "https://github.com/eloquentarduino"

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=EloquentEsp32cam
2-
version=2.7.6
2+
version=2.7.7
33
author=Simone Salerno <support@eloquentarduino.com>
44
maintainer=Simone Salerno <support@eloquentarduino.com>
55
sentence=Use your Esp32-cam like an expert

0 commit comments

Comments
 (0)