Changeset View
Changeset View
Standalone View
Standalone View
source/blender/imbuf/intern/targa.c
| Show First 20 Lines • Show All 361 Lines • ▼ Show 20 Lines | static void complete_partial_load(struct ImBuf *ibuf, unsigned int *rect) | ||||
| int size = (ibuf->x * ibuf->y) - (rect - ibuf->rect); | int size = (ibuf->x * ibuf->y) - (rect - ibuf->rect); | ||||
| if (size) { | if (size) { | ||||
| printf("decodetarga: incomplete file, %.1f%% missing\n", 100 * ((float)size / (ibuf->x * ibuf->y))); | printf("decodetarga: incomplete file, %.1f%% missing\n", 100 * ((float)size / (ibuf->x * ibuf->y))); | ||||
| /* not essential but makes displaying partially rendered TGA's less ugly */ | /* not essential but makes displaying partially rendered TGA's less ugly */ | ||||
| memset(rect, 0, size); | memset(rect, 0, size); | ||||
| } | } | ||||
| else { | else { | ||||
| /* shouldnt happen */ | /* shouldn't happen */ | ||||
| printf("decodetarga: incomplete file, all pixels written\n"); | printf("decodetarga: incomplete file, all pixels written\n"); | ||||
| } | } | ||||
| } | } | ||||
| static void decodetarga(struct ImBuf *ibuf, const unsigned char *mem, size_t mem_size, int psize) | static void decodetarga(struct ImBuf *ibuf, const unsigned char *mem, size_t mem_size, int psize) | ||||
| { | { | ||||
| const unsigned char *mem_end = mem + mem_size; | const unsigned char *mem_end = mem + mem_size; | ||||
| int count, col, size; | int count, col, size; | ||||
| ▲ Show 20 Lines • Show All 335 Lines • Show Last 20 Lines | |||||