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/intern/jpeg.c | |
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/intern/jpeg.c')
-rw-r--r-- | source/blender/imbuf/intern/jpeg.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index 10cf082dd0a..378c43bc2ba 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -613,15 +613,13 @@ static int save_maxjpeg(char * name, struct ImBuf * ibuf) } -int imb_save_jpeg(char * name, struct ImBuf * ibuf, int flags) +int imb_savejpeg(struct ImBuf * ibuf, char * name, int flags) { - int ret; ibuf->flags = flags; - if (IS_stdjpg(ibuf)) ret = save_stdjpeg(name, ibuf); - else if (IS_jstjpg(ibuf)) ret = save_jstjpeg(name, ibuf); - else if (IS_maxjpg(ibuf)) ret = save_maxjpeg(name, ibuf); - else ret = save_vidjpeg(name, ibuf); - return(ret); + if (IS_stdjpg(ibuf)) return save_stdjpeg(name, ibuf); + if (IS_jstjpg(ibuf)) return save_jstjpeg(name, ibuf); + if (IS_maxjpg(ibuf)) return save_maxjpeg(name, ibuf); + return save_vidjpeg(name, ibuf); } |