Add api for load image from encoded buffer + fix file-reader.h bug