AnimaEngine  1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
png_pipeline.h
Go to the documentation of this file.
1 
6 #ifndef PNG_PIPELINE_H
7 #define PNG_PIPELINE_H
8 
9 #include "common.h"
10 #include "ppm.h"
11 #include "ncgr.h"
12 #include "nclr.h"
13 #include "ncer.h"
14 
15 #define PNG_PATH_BUFFER_SIZE 4096
25  const char *ncgr_path,
26  const char *nclr_path,
27  const char *out_path
28 );
29 
41  const RgbaColor *pixels,
42  int width,
43  int height,
44  RgbaColor **out_pixels,
45  int *out_width,
46  int *out_height
47 );
48 
57  const char *ncgr_path,
58  const char *nclr_path,
59  const char *out_path
60 );
61 
70  const char *ncgr_path,
71  const char *nclr_path,
72  const char *out_path
73 );
74 
84  const char *ncgr_path,
85  const char *ncer_path,
86  const char *nclr_path,
87  const char *out_dir
88 );
89 
104  const RgbaColor *front, int front_w, int front_h,
105  const RgbaColor *back, int back_w, int back_h,
106  RgbaColor **out_combined, int *out_combined_w, int *out_combined_h
107 );
108 
120  const NcerFile *ncer,
121  const NcgrImage *ncgr,
122  const NclrPalette *palette,
123  RgbaColor **out_combined, int *out_combined_w, int *out_combined_h
124 );
125 
126 #endif
127 
Common types, macros, and standard library includes used throughout AnimaEngine.
Nintendo Cell Resource (.NCER) parser representing individual 2D sprite composite elements.
Nintendo Character Graphic Resource (.NCGR) 2D tile character graphics structures.
Nintendo Color Resource (.NCLR) palette parser.
int PngPipeline_CombineToGrid(const NcerFile *ncer, const NcgrImage *ncgr, const NclrPalette *palette, RgbaColor **out_combined, int *out_combined_w, int *out_combined_h)
Recomposes and stitches all frames defined in NCER cells side-by-side in a single grid sheet.
Definition: png_pipeline.c:472
int PngPipeline_CroppedSprite(const char *ncgr_path, const char *nclr_path, const char *out_path)
Renders the first cell frame from NCGR tiles, cropped to its alpha bounding box, and saves it.
Definition: png_pipeline.c:165
int PngPipeline_CombineSideBySide(const RgbaColor *front, int front_w, int front_h, const RgbaColor *back, int back_w, int back_h, RgbaColor **out_combined, int *out_combined_w, int *out_combined_h)
Stitches two RGBA images side-by-side into a single combined buffer.
Definition: png_pipeline.c:416
int PngPipeline_CropToAlpha(const RgbaColor *pixels, int width, int height, RgbaColor **out_pixels, int *out_width, int *out_height)
Crops transparent borders around a pixel frame buffer.
Definition: png_pipeline.c:92
int PngPipeline_TilePreview(const char *ncgr_path, const char *nclr_path, const char *out_path)
Renders NCGR tiles in order to a standard PNG preview file.
Definition: png_pipeline.c:5
int PngPipeline_ExactNcgr(const char *ncgr_path, const char *nclr_path, const char *out_path)
Renders the exact tile character page layout defined by NCGR and exports as PNG.
Definition: png_pipeline.c:239
int PngPipeline_CellPreviews(const char *ncgr_path, const char *ncer_path, const char *nclr_path, const char *out_dir)
Renders all individual cells in NCGR as static PNGs.
Definition: png_pipeline.c:293
Portable Pixmap (PPM) format writer utilities and color structures.
Unpacked representation of a complete .NCER resource.
Definition: ncer.h:56
Container representing parsed NCGR image tile graphics.
Definition: ncgr.h:15
Container representing parsed NCLR color palette data.
Definition: nclr.h:17
32-bit RGBA color representation struct.
Definition: ppm.h:14