diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a52daa..adb1bbf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # The version number. set(VERSION_MAJOR 0) set(VERSION_MINOR 4) -set(VERSION_PATCH 2) +set(VERSION_PATCH 3) configure_file( "caesium/config.h.in" diff --git a/README.md b/README.md index 2fdfcae..27644e4 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ This will compile both the shared and static caesium library, the required heade ##### Requirements You need basic developer utilities. On Ubuntu you can install them with ```bash -sudo apt-get install libtool autoconf git nasm pkg-config cmake +sudo apt-get install libtool autoconf git nasm pkg-config cmake libpng-dev ``` Then run `install.sh` to get the latest mozjpeg and zopfli. ##### Compile diff --git a/caesium/jpeg.c b/caesium/jpeg.c index d20a8b9..5d7647a 100644 --- a/caesium/jpeg.c +++ b/caesium/jpeg.c @@ -227,6 +227,7 @@ unsigned char *cs_jpeg_decompress(const char *fileName, cs_jpeg_pars *options) display_error(ERROR, 208); } + fclose(fp); tjDestroy(tjDecompressHandle); tjFree(sourceJpegBuffer); diff --git a/demo/main.c b/demo/main.c index f9abacf..9f1a05c 100644 --- a/demo/main.c +++ b/demo/main.c @@ -18,5 +18,5 @@ int main(int argc, char *argv[]) cs_image_pars options = initialize_parameters(); bool result = cs_compress(argv[1], argv[2], &options); - exit(result); + exit(!result); } \ No newline at end of file