Changeset View
Changeset View
Standalone View
Standalone View
source/blender/imbuf/intern/targa.c
| Show First 20 Lines • Show All 280 Lines • ▼ Show 20 Lines | static bool dumptarga(struct ImBuf *ibuf, FILE *file) | ||||
| } | } | ||||
| else { | else { | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| return 1; | return 1; | ||||
| } | } | ||||
| int imb_savetarga(struct ImBuf *ibuf, const char *name, int flags) | int imb_savetarga(struct ImBuf *ibuf, const char *name, eImBufFlags flags) | ||||
| { | { | ||||
| char buf[20] = {0}; | char buf[20] = {0}; | ||||
| FILE *fildes; | FILE *fildes; | ||||
| bool ok = false; | bool ok = false; | ||||
| (void)flags; /* unused */ | (void)flags; /* unused */ | ||||
| buf[16] = (ibuf->planes + 0x7) & ~0x7; | buf[16] = (ibuf->planes + 0x7) & ~0x7; | ||||
| ▲ Show 20 Lines • Show All 314 Lines • ▼ Show 20 Lines | static void ldtarga(struct ImBuf *ibuf, const unsigned char *mem, size_t mem_size, int psize) | ||||
| return; | return; | ||||
| partial_load: | partial_load: | ||||
| complete_partial_load(ibuf, rect); | complete_partial_load(ibuf, rect); | ||||
| } | } | ||||
| ImBuf *imb_loadtarga(const unsigned char *mem, | ImBuf *imb_loadtarga(const unsigned char *mem, | ||||
| size_t mem_size, | size_t mem_size, | ||||
| int flags, | eImBufFlags flags, | ||||
| char colorspace[IM_MAX_SPACE]) | char colorspace[IM_MAX_SPACE]) | ||||
| { | { | ||||
| TARGA tga; | TARGA tga; | ||||
| struct ImBuf *ibuf; | struct ImBuf *ibuf; | ||||
| int count, size; | int count, size; | ||||
| unsigned int *rect, *cmap = NULL /*, mincol = 0*/, cmap_max = 0; | unsigned int *rect, *cmap = NULL /*, mincol = 0*/, cmap_max = 0; | ||||
| int32_t cp_data; | int32_t cp_data; | ||||
| uchar *cp = (uchar *)&cp_data; | uchar *cp = (uchar *)&cp_data; | ||||
| ▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines | |||||