Skip to content

Commit 8544435

Browse files
committed
UI: update IMAGE handling
1 parent 724bc30 commit 8544435

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ui/image.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ ImageBuffer *load_image(var_t *var) {
195195
for (int x = 0; x < w; x++) {
196196
int pos = y * w + x;
197197
var_t *elem = (var_t *) (var->v.a.ptr + (sizeof(var_t) * pos));
198-
pixel_t px = v_getint(elem);
198+
pixel_t px = -v_getint(elem);
199199
uint8_t r, g, b;
200200
GET_RGB2(px, r, g, b);
201201
int offs = yoffs + (4 * x);
@@ -402,7 +402,7 @@ void cmd_image_save(var_s *self) {
402402
pixel_t px = SET_RGB(r, g, b);
403403
int pos = y * w + x;
404404
var_t *elem = (var_t *) (array->v.a.ptr + (sizeof(var_t) * pos));
405-
v_setint(elem, px);
405+
v_setint(elem, -px);
406406
}
407407
}
408408
saved = true;

0 commit comments

Comments
 (0)