Blender
V3.3
|
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../blenlib/BLI_sys_types.h"
#include <dirent.h>
#include <png.h>
Go to the source code of this file.
Classes | |
struct | IconHead |
struct | IconInfo |
struct | IconMergeContext |
Macros | |
#define | SEP '/' |
Functions | |
static int | path_ensure_slash (char *string) |
static bool | path_test_extension (const char *str, const char *ext) |
static void | endian_switch_uint32 (uint *val) |
static const char * | path_slash_rfind (const char *string) |
static const char * | path_basename (const char *path) |
static bool | write_png (const char *name, const uint *pixels, const int width, const int height) |
static void | icon_merge_context_init (struct IconMergeContext *context) |
static struct IconInfo * | icon_merge_context_info_for_icon_head (struct IconMergeContext *context, struct IconHead *icon_head) |
static void | icon_merge_context_register_icon (struct IconMergeContext *context, const char *file_name, const struct IconHead *icon_head) |
static void | icon_merge_context_free (struct IconMergeContext *context) |
static bool | icon_decode_head (FILE *f_src, struct IconHead *r_head) |
static bool | icon_decode (FILE *f_src, struct IconHead *r_head, uint **r_pixels) |
static bool | icon_read (const char *file_src, struct IconHead *r_head, uint **r_pixels) |
static bool | icon_merge (struct IconMergeContext *context, const char *file_src, uint32_t **r_pixels_canvas, uint *r_canvas_w, uint *r_canvas_h) |
static bool | icondir_to_png (const char *path_src, const char *file_dst) |
int | main (int argc, char **argv) |
#define SEP '/' |
Definition at line 31 of file datatoc_icon.c.
Definition at line 55 of file datatoc_icon.c.
Referenced by icon_decode_head().
Definition at line 276 of file datatoc_icon.c.
References free(), icon_decode_head(), IconHead::icon_h, IconHead::icon_w, and NULL.
Referenced by icon_read().
Definition at line 256 of file datatoc_icon.c.
References IconHead::canvas_h, IconHead::canvas_w, endian_switch_uint32(), IconHead::icon_h, IconHead::icon_w, IconHead::orig_x, IconHead::orig_y, and void.
Referenced by icon_decode().
|
static |
Definition at line 320 of file datatoc_icon.c.
References IconHead::canvas_h, IconHead::canvas_w, blender::compositor::context, IconInfo::file_name, free(), IconInfo::head, IconHead::icon_h, icon_merge_context_info_for_icon_head(), icon_merge_context_register_icon(), icon_read(), IconHead::icon_w, NULL, IconHead::orig_x, IconHead::orig_y, path_basename(), void, x, and y.
Referenced by icondir_to_png().
|
static |
Definition at line 246 of file datatoc_icon.c.
References blender::compositor::context, free(), and NULL.
Referenced by icondir_to_png().
|
static |
Definition at line 213 of file datatoc_icon.c.
References blender::compositor::context, IconInfo::head, NULL, IconHead::orig_x, and IconHead::orig_y.
Referenced by icon_merge().
|
static |
Definition at line 204 of file datatoc_icon.c.
References blender::compositor::context, and NULL.
Referenced by icondir_to_png().
|
static |
Definition at line 232 of file datatoc_icon.c.
References blender::compositor::context, IconInfo::file_name, IconInfo::head, and path_basename().
Referenced by icon_merge().
Definition at line 303 of file datatoc_icon.c.
References icon_decode(), and NULL.
Referenced by icon_merge().
|
static |
Definition at line 388 of file datatoc_icon.c.
References blender::compositor::context, dirent::d_name, free(), icon_merge(), icon_merge_context_free(), icon_merge_context_init(), NULL, path_ensure_slash(), path_test_extension(), and write_png().
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 457 of file datatoc_icon.c.
References icondir_to_png().
|
static |
Definition at line 76 of file datatoc_icon.c.
References path_slash_rfind().
Referenced by icon_merge(), and icon_merge_context_register_icon().
|
static |
Definition at line 37 of file datatoc_icon.c.
Referenced by icondir_to_png().
|
static |
Definition at line 61 of file datatoc_icon.c.
Referenced by path_basename().
|
static |
Definition at line 48 of file datatoc_icon.c.
References Freestyle::a, usdtokens::b(), and str.
Referenced by icondir_to_png().
|
static |
Definition at line 85 of file datatoc_icon.c.
References free(), height, NULL, and width.
Referenced by icondir_to_png().