diff options
author | Kent Mein <mein@cs.umn.edu> | 2003-12-04 21:18:05 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2003-12-04 21:18:05 +0300 |
commit | 24624501a473c13f6a6d9c4676cbdd33b4a88e73 (patch) | |
tree | 6b0c79b38b21da22fac3e0a6f141b970e610b473 /source/blender/imbuf/readme.txt | |
parent | 43369f076f3be5000f56079f31767ffc3e730d2b (diff) |
This looks like a lot but its a few small changes.
Summary: standardized imageformat functions(make function names similar, and
parameters in same order where relavant), small code cleanups, and
added a description of how to add an image format to blender.
Kent
Specifics:
merged png_decode.c and png_encode.c to png.c and cleaned function calls.
fixed some spacing in IMB_imbuf_types.h
casting cleanups:
intern/amiga.c
intern/ham.c
intern/iris.c
Modified switch statements to have a default type to insure values are set:
intern/antialias.c
Initalization of some vars and make types similar.
intern/bitplanes.c
cleaned function calls, and changed if else to if's with return:
intern/jpeg.c
added {}'s in multidemensional arrays.
intern/matrix.h
Made a little cleaner to read, and matched above changes.
intern/readimage.c
intern/writeimage.c
Diffstat (limited to 'source/blender/imbuf/readme.txt')
-rw-r--r-- | source/blender/imbuf/readme.txt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/imbuf/readme.txt b/source/blender/imbuf/readme.txt new file mode 100644 index 00000000000..d50cf82af89 --- /dev/null +++ b/source/blender/imbuf/readme.txt @@ -0,0 +1,27 @@ +The following 4 steps to adding a new image format to blender, its +probably easiest to look at the png code for a clean clear example, +animation formats are a bit more complicated but very similar: + +Step 1: +create a new file named after the format for example lets say we were +creating an openexr read/writer use openexr.c +It should contain functions to match the following prototypes: + +struct ImBuf *imb_loadopenexr(unsigned char *mem,int size,int flags); +/* Use one of the following depending on whats easyer for your file format */ +short imb_saveopenexr(struct ImBuf *ibuf, FILE myfile, int flags); +short imb_saveopenexr(struct ImBuf *ibuf, char *myfile, int flags); + +/* Used to test if its the correct format +int IMB_is_openexr(void *buf); + +Step 2: +Add your hooks to read and write the image format these go in + writeimage.c and readimage.c just look at how the others are done + +Step 3: +Add in IS_openexr to blender/source/blender/imbuf/IMB_imbuf_types.h + +Step 4: +Add any external library info to the build process. + |