diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-11 08:14:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-11 08:14:05 +0300 |
commit | a5f8071bdf7893ef487c677b460793e8bef55402 (patch) | |
tree | 50593a4a3f98a0fb0975e2346c6c78c55823eafb /source/blender/imbuf/intern/jp2.c | |
parent | e9c19b28202eb1fdc774d62f23896bf9fafb0fb8 (diff) |
Cleanup: use bool for imbuf save callbacks
Diffstat (limited to 'source/blender/imbuf/intern/jp2.c')
-rw-r--r-- | source/blender/imbuf/intern/jp2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index 97af0eb8feb..f0486852d6f 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -1194,22 +1194,22 @@ static opj_image_t *ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters) return image; } -int imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int flags); +bool imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int flags); -int imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags) +bool imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags) { opj_stream_t *stream = opj_stream_create_from_file( filepath, OPJ_J2K_STREAM_CHUNK_SIZE, false, NULL); if (stream == NULL) { return 0; } - int ret = imb_save_jp2_stream(ibuf, stream, flags); + const bool ok = imb_save_jp2_stream(ibuf, stream, flags); opj_stream_destroy(stream); - return ret; + return ok; } /* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */ -int imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int UNUSED(flags)) +bool imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int UNUSED(flags)) { int quality = ibuf->foptions.quality; @@ -1230,7 +1230,7 @@ int imb_save_jp2_stream(struct ImBuf *ibuf, opj_stream_t *stream, int UNUSED(fla image = ibuftoimage(ibuf, ¶meters); opj_codec_t *codec = NULL; - int ok = false; + bool ok = false; /* JP2 format output */ { /* get a JP2 compressor handle */ |