summaryrefslogtreecommitdiff
path: root/lodepng.h
diff options
context:
space:
mode:
authorLode <lvandeve@gmail.com>2015-12-09 00:20:41 +0100
committerLode <lvandeve@gmail.com>2015-12-09 00:20:41 +0100
commitc965e8a1f340675bc8a10638470f818e3f743724 (patch)
treed5834e8948339ee50eadd277230efd03dd1ceb0a /lodepng.h
parent942c151c7b92dc727fc2d0a00211e9fa83ef6e83 (diff)
Made load_file function return error if file can't be opened
Diffstat (limited to 'lodepng.h')
-rw-r--r--lodepng.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/lodepng.h b/lodepng.h
index 86c24f9..800cd0c 100644
--- a/lodepng.h
+++ b/lodepng.h
@@ -1,5 +1,5 @@
/*
-LodePNG version 20151024
+LodePNG version 20151208
Copyright (c) 2005-2015 Lode Vandevenne
@@ -848,10 +848,10 @@ unsigned encode(std::vector<unsigned char>& out,
#ifdef LODEPNG_COMPILE_DISK
/*
-Load a file from disk into an std::vector. If the vector is empty, then either
-the file doesn't exist or is an empty file.
+Load a file from disk into an std::vector.
+return value: error code (0 means ok)
*/
-void load_file(std::vector<unsigned char>& buffer, const std::string& filename);
+unsigned load_file(std::vector<unsigned char>& buffer, const std::string& filename);
/*
Save the binary data in an std::vector to a file on disk. The file is overwritten
@@ -1564,6 +1564,7 @@ yyyymmdd.
Some changes aren't backwards compatible. Those are indicated with a (!)
symbol.
+*) 08 dec 2015: Made load_file function return error if file can't be opened.
*) 24 okt 2015: Bugfix with decoding to palette output.
*) 18 apr 2015: Boundary PM instead of just package-merge for faster encoding.
*) 23 aug 2014: Reduced needless memory usage of decoder.