|
Revision 415, 1.7 kB
(checked in by anthony_rowe, 2 years ago)
|
no more GUI hang leaving line mode
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
#include "cc3.h" |
|---|
| 20 |
#include "cc3_ilp.h" |
|---|
| 21 |
#include <stdbool.h> |
|---|
| 22 |
#include <stdio.h> |
|---|
| 23 |
#include <stdlib.h> |
|---|
| 24 |
|
|---|
| 25 |
uint8_t cc3_load_img_rows (cc3_image_t * img, uint16_t rows) |
|---|
| 26 |
{ |
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
} |
|---|
| 30 |
|
|---|
| 31 |
inline void cc3_get_pixel (cc3_image_t * img, uint16_t x, uint16_t y, |
|---|
| 32 |
cc3_pixel_t * out_pix) |
|---|
| 33 |
{ |
|---|
| 34 |
if (img->channels > 1) { |
|---|
| 35 |
out_pix->channel[0] = ((uint8_t *) img->pix)[y * img->width + (x * 3)]; |
|---|
| 36 |
out_pix->channel[1] = |
|---|
| 37 |
((uint8_t *) img->pix)[y * img->width + (x * 3) + 1]; |
|---|
| 38 |
out_pix->channel[2] = |
|---|
| 39 |
((uint8_t *) img->pix)[y * img->width + (x * 3) + 2]; |
|---|
| 40 |
} |
|---|
| 41 |
else { |
|---|
| 42 |
out_pix->channel[0] = ((uint8_t *) img->pix)[y * img->width + x]; |
|---|
| 43 |
} |
|---|
| 44 |
|
|---|
| 45 |
} |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
inline void cc3_set_pixel (cc3_image_t * img, uint16_t x, uint16_t y, |
|---|
| 49 |
cc3_pixel_t * in_pix) |
|---|
| 50 |
{ |
|---|
| 51 |
if (img->channels > 1) { |
|---|
| 52 |
((uint8_t *) img->pix)[y * img->width + (x * 3)] = in_pix->channel[0]; |
|---|
| 53 |
((uint8_t *) img->pix)[y * img->width + (x * 3) + 1] = in_pix->channel[1]; |
|---|
| 54 |
((uint8_t *) img->pix)[y * img->width + (x * 3) + 2] = in_pix->channel[2]; |
|---|
| 55 |
} |
|---|
| 56 |
else { |
|---|
| 57 |
((uint8_t *) img->pix)[y * img->width + x] = in_pix->channel[0]; |
|---|
| 58 |
} |
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 |
} |
|---|