dlib/dlib
pfeatherstone 106c5a265d
[PNG] save_png() now works with std::vector and std::ostream (#2873)
* save_png() works with buffers and streams

* optimization for bgr_pixel

* explicit overloads for matrix<> and matrix_exp<>. Added docs for new savers

* refactored loading implementations details. In my view, easier to read, mirrors saving implementations details, and supports iostreams. We could make the callback API public, and we could support a ton of APIs...

* test for iostreams

* oops

* - reduced code size by templating byte type
- docs

* spelling

* i hope i haven't made a pig's breakfast out of this

---------

Co-authored-by: pf <pf@me>
2023-10-11 18:54:34 -04:00
..
all Add CIFAR-10 dataset loader (#2245) 2020-11-29 14:47:34 -05:00
any oops, fix build error 2023-09-17 21:34:25 -04:00
array Fixed compiler warnings in gcc 8 2019-03-03 21:17:20 -05:00
array2d Treat warnings as errors (#2490) 2022-04-12 18:53:52 -04:00
base64 Fixed spelling errors. 2018-02-14 22:01:53 -05:00
bayes_utils Treat warnings as errors (#2490) 2022-04-12 18:53:52 -04:00
bigint Modernize rounding and cast statements (#2633) 2022-08-04 18:36:12 -04:00
binary_search_tree Fixed compiler warnings in gcc 8 2019-03-03 21:17:20 -05:00
bit_stream Fixed spelling errors. 2018-02-14 22:01:53 -05:00
bits Hopefully improved compiler error diagnostic when using gcc and a user misconfigures their build environment. 2017-07-15 22:29:44 -04:00
bound_function_pointer Miscellaneous cleanup and refresh (#2661) 2022-09-19 08:18:39 -04:00
bridge Miscellaneous cleanup and refresh (#2661) 2022-09-19 08:18:39 -04:00
bsp Migrate from dlib::scoped_ptr to std::unique_ptr (#593) 2017-05-14 19:52:34 -04:00
byte_orderer Made byte_orderer copyable. 2012-02-28 18:44:27 -05:00
clustering clarified spec 2016-11-27 13:24:16 -05:00
cmake_utils updated cudnn path (#2843) 2023-08-05 09:39:56 -04:00
cmd_line_parser fix spelling error in comment 2021-09-25 10:51:42 -04:00
compress_stream
conditioning_class
config_reader All I did in this change was rename a bunch of reinterpret_casts 2012-05-20 23:38:55 -04:00
control Added mpc option to say you only care about the first time we get to the target 2021-09-23 12:25:58 -04:00
cpp_pretty_printer Make struct some_type; get bolded when pretty printed 2022-01-24 22:01:47 -05:00
cpp_tokenizer Fixed more gcc 8 warnings. 2019-03-03 21:35:15 -05:00
crc32 Treat warnings as errors (#2490) 2022-04-12 18:53:52 -04:00
cuda Add fuse layers for conv+affine+relu and conv+relu (#2842) 2023-08-05 12:38:29 -04:00
data_io YOLO loss (#2376) 2021-07-29 20:05:54 -04:00
dir_nav Fix documentation 2022-04-06 22:37:52 -04:00
directed_graph Replace shared_ptr/weak_ptr with STL's versions (#588) 2017-05-12 16:40:59 -04:00
disjoint_subsets fix some spelling and grammar errors 2020-08-07 15:41:42 -04:00
dnn Add fuse layers for conv+affine+relu and conv+relu (#2842) 2023-08-05 12:38:29 -04:00
entropy_decoder
entropy_decoder_model
entropy_encoder Fixed spelling errors. 2018-02-14 22:01:53 -05:00
entropy_encoder_model
external Update Pybind11 to v2.10.0 (#2660) 2022-09-05 15:59:19 -04:00
fft [FFT] split FFT API into different layers (#2793) 2023-05-06 11:43:10 -04:00
filtering fixed spelling error 2020-01-05 08:09:32 -05:00
general_hash iEnsures DLIB_FALLTHROUGH macro is only set for GCC>=7 (#1770) 2019-05-16 20:37:11 -04:00
geometry update docs and some cleanup 2023-09-17 21:26:29 -04:00
global_optimization Miscellaneous cleanup and refresh (#2661) 2022-09-19 08:18:39 -04:00
graph Replace shared_ptr/weak_ptr with STL's versions (#588) 2017-05-12 16:40:59 -04:00
graph_cuts Fixes issue with object named nil that collide with apple's definition. (#537) 2017-04-14 20:41:22 -04:00
graph_utils remove unused variable in edge_list_graphs.h (#486) 2017-03-18 15:17:52 -04:00
gui_core Apple Clang complains about sprintf. Use snprintf instead. (#2862) 2023-09-19 08:12:02 -04:00
gui_widgets Apple Clang complains about sprintf. Use snprintf instead. (#2862) 2023-09-19 08:12:02 -04:00
hash_map Fixed compiler warnings in gcc 8 2019-03-03 21:17:20 -05:00
hash_set Fixed compiler warnings in gcc 8 2019-03-03 21:17:20 -05:00
hash_table Fixed compiler warnings in gcc 8 2019-03-03 21:17:20 -05:00
http_client Apple Clang complains about sprintf. Use snprintf instead. (#2862) 2023-09-19 08:12:02 -04:00
image_keypoint Modernize rounding and cast statements (#2633) 2022-08-04 18:36:12 -04:00
image_loader [PNG] save_png() now works with std::vector and std::ostream (#2873) 2023-10-11 18:54:34 -04:00
image_processing update docs and some cleanup 2023-09-17 21:26:29 -04:00
image_saver [PNG] save_png() now works with std::vector and std::ostream (#2873) 2023-10-11 18:54:34 -04:00
image_transforms update docs and some cleanup 2023-09-17 21:26:29 -04:00
interfaces Treat warnings as errors (#2490) 2022-04-12 18:53:52 -04:00
iosockstream Migrate from dlib::scoped_ptr to std::unique_ptr (#593) 2017-05-14 19:52:34 -04:00
java Make C++14 and CMake 3.8.0 the new minimum required versions 2022-07-31 17:45:18 -04:00
linker Integer conversions generating compiler warnings (#2024) 2020-03-14 19:12:04 -04:00
logger Migrate from dlib::scoped_ptr to std::unique_ptr (#593) 2017-05-14 19:52:34 -04:00
lsh fix some spelling and grammar errors 2020-08-07 15:41:42 -04:00
lz77_buffer
lzp_buffer Problem: integer overflow when calculating sizes (may happen e.g. with very large images) (#1148) 2018-03-01 07:27:29 -05:00
manifold_regularization Problem: integer overflow when calculating sizes (may happen e.g. with very large images) (#1148) 2018-03-01 07:27:29 -05:00
map Fixed compiler warnings in gcc 8 2019-03-03 21:17:20 -05:00
math - possible for fix for MSVC (#2637) 2022-08-09 18:38:53 -04:00
matlab Add sig_traits back since the matlab wrapper depedned on it. 2023-07-21 08:19:09 -04:00
matrix fix incorrect assert and typo in docs 2023-09-24 15:05:33 -04:00
md5 Integer conversions generating compiler warnings (#2024) 2020-03-14 19:12:04 -04:00
media bug fix when multiple streams are present (#2863) 2023-09-19 08:09:55 -04:00
member_function_pointer Fix #1479 -- member_function_pointer_kernel_1.h does not compile with MSVC /vms (#1481) 2018-09-13 08:07:30 -04:00
memory_manager Made memory managers use size_t to measure memory allocation sizes rather than unsigned long. 2018-05-15 22:11:40 -04:00
memory_manager_global Made memory managers use size_t to measure memory allocation sizes rather than unsigned long. 2018-05-15 22:11:40 -04:00
memory_manager_stateless Made memory managers use size_t to measure memory allocation sizes rather than unsigned long. 2018-05-15 22:11:40 -04:00
misc_api Rename POSIX macro to DLIB_POSIX to avoid name clashes with some libraries. 2020-09-01 09:30:52 -04:00
mlp A minor change to avoid compiler errors when serializing mlp objects. 2014-01-01 12:11:43 -05:00
numerical_integration Renamed a variable to avoid a name conflict on windows which was pointed out by 2014-08-15 20:16:21 -04:00
opencv Fix error for opencv 3.4.9+ over IplImage (#1949) (#1963) 2020-01-07 21:12:30 -05:00
optimization Fix find_max() going into an infinite loop in some cases when a non-differentiable function is given. 2019-10-31 20:23:15 -04:00
pipe Problem: integer overflow when calculating sizes (may happen e.g. with very large images) (#1148) 2018-03-01 07:27:29 -05:00
python Fix unused variable warning in Pybind11 (#2726) 2023-02-10 22:03:47 -05:00
quantum_computing
queue fix spelling errors (#1985) 2020-01-28 21:02:41 -05:00
rand Add get_random_beta to dlib::rand (#2499) 2022-02-12 09:28:34 -05:00
random_forest Fix random foreset regression not doing quite the right thing. 2020-06-20 14:44:30 -04:00
reference_counter
sequence Fixed compiler warnings in gcc 8 2019-03-03 21:17:20 -05:00
server Migrate from dlib::scoped_ptr to std::unique_ptr (#593) 2017-05-14 19:52:34 -04:00
set Fixed compiler warnings in gcc 8 2019-03-03 21:17:20 -05:00
set_utils
simd powerpc/altivec: use __vector instead of vector (#2740) 2023-03-11 08:16:15 -05:00
sliding_buffer 10X speedup (#2779) 2023-04-21 23:37:19 -04:00
smart_pointers Removed auto_ptr from these old smart pointers since auto_ptr is officially 2018-01-21 13:14:18 -05:00
sockets Rename POSIX macro to DLIB_POSIX to avoid name clashes with some libraries. 2020-09-01 09:30:52 -04:00
sockstreambuf Migrate from dlib::scoped_ptr to std::unique_ptr (#593) 2017-05-14 19:52:34 -04:00
sqlite Switched to non-deprecated way to say destructor might throw. 2019-04-03 22:48:29 -04:00
stack Fixed compiler warnings in gcc 8 2019-03-03 21:17:20 -05:00
static_map Treat warnings as errors (#2490) 2022-04-12 18:53:52 -04:00
static_set Fixed compiler warnings in gcc 8 2019-03-03 21:17:20 -05:00
statistics Add sum method to running stats (#2728) 2023-02-10 22:02:54 -05:00
stl_checked std_vector.h : making traits compatible with C++20 2021-04-24 10:16:26 -04:00
string Added split_on_first() and split_on_last(). 2014-04-16 19:54:55 -04:00
svm Add multiclass SVM trainer to svm/auto.h (#2642) 2022-08-17 19:29:04 -04:00
sync_extension
test [PNG] save_png() now works with std::vector and std::ostream (#2873) 2023-10-11 18:54:34 -04:00
threads Miscellaneous cleanup and refresh (#2661) 2022-09-19 08:18:39 -04:00
timeout Removed cruft 2012-11-18 13:09:07 -05:00
timer Replace shared_ptr_thread_safe with std::shared_ptr (#590) 2017-05-13 14:05:23 -04:00
tokenizer Fixed double delete 2017-03-18 13:00:16 -04:00
tuple
type_safe_union update docs and some cleanup 2023-09-17 21:26:29 -04:00
unicode update docs and some cleanup 2023-09-17 21:26:29 -04:00
vectorstream Avoid different kinds of compiler warnings (#2481) 2022-01-06 09:03:48 -05:00
xml_parser Make xml parser more robust to bad inputs 2022-07-30 09:09:35 -04:00
algs.h Miscellaneous cleanup and refresh (#2661) 2022-09-19 08:18:39 -04:00
any.h
array2d.h Added a file that defines a new generic image interface for images in dlib. 2014-07-17 19:23:43 -04:00
array.h Added split_array() 2013-08-23 07:11:09 -04:00
assert.h switch to a name less likely to conflict with third party code 2020-08-19 19:48:14 -04:00
base64.h
bayes_utils.h
bigint.h
binary_search_tree.h
bit_stream.h
bound_function_pointer.h Converted the bound_function_pointer into a single implementation component. 2012-11-18 12:07:38 -05:00
bridge.h Added some preprocessor stuff to check if the user is #including 2016-01-17 11:54:31 -05:00
bsp.h Just removed double __ from the inclusion guard names. 2014-07-18 21:46:24 -04:00
byte_orderer.h
cassert
clustering.h Added bottom_up_cluster() 2015-06-23 08:24:48 -04:00
cmake Make C++14 and CMake 3.8.0 the new minimum required versions 2022-07-31 17:45:18 -04:00
CMakeLists.txt Apply archiver flags only on Apple using Apple compilers (#2854) 2023-09-12 08:30:58 -04:00
cmd_line_parser.h Fixed compiler error with the cmd_line_parser and global swap() introduced 2012-11-12 16:52:37 -05:00
compress_stream.h
conditioning_class.h
config_reader.h Added the get_option() routines which slightly simplify getting options 2012-02-02 23:52:51 -05:00
config.h Moved files around. 2018-02-28 19:29:30 -05:00
config.h.in added DLIB_USE_FFMPEG to config.h.in (#2720) 2023-02-03 17:38:30 -05:00
console_progress_indicator.h Use chrono in console progress indicator and add finish method (#2617) 2022-07-06 20:05:22 -04:00
constexpr_if.h - moved is_detected in type_traits.h (#2794) 2023-05-08 22:39:15 -04:00
control.h Added initial version of linear mpc 2015-05-27 08:10:29 -04:00
cpp_pretty_printer.h
cpp_tokenizer.h
crc32.h
cstring
data_io.h Add CIFAR-10 dataset loader (#2245) 2020-11-29 14:47:34 -05:00
dir_nav.h
directed_graph.h
disjoint_subsets.h Minor cleanup 2017-12-01 07:17:09 -05:00
dlib_basic_cpp_build_tutorial.txt Added some preprocessor stuff to check if the user is #including 2016-01-17 11:54:31 -05:00
dlib_include_path_tutorial.txt
dnn.h Add visitor to draw nets in the DOT language (#2528) 2022-03-03 07:20:24 -05:00
enable_if.h Removed boost namespace to avoid name clashes with newer versions of boost. 2014-11-24 18:57:16 -05:00
entropy_decoder_model.h
entropy_decoder.h
entropy_encoder_model.h
entropy_encoder.h
error.h Added DLIB_NO_ABORT_ON_2ND_FATAL_ERROR for dlib::fatal_error as a generic 2017-08-10 16:07:42 -04:00
filtering.h Added the rls_filter object. 2012-03-07 22:25:54 -05:00
float_details.h Cleaned up the float_details code and made it more standards conforming. 2015-10-22 08:10:41 -04:00
fstream
functional.h potential fix for gcc 5.1 onward (#2870) 2023-09-30 11:11:13 +00:00
geometry.h Add simple polygon class (#2750) 2023-03-26 21:05:43 -04:00
global_optimization.h Renamed find_global_maximum() to find_max_global() 2017-11-23 11:43:32 -05:00
graph_cuts.h Just moved some files and #includes around a little. 2012-05-06 22:35:42 -04:00
graph_utils_threaded.h Made graph_utils_threaded.h #include graph_utils.h 2013-03-14 21:33:32 -04:00
graph_utils.h Moved more graph tools into the graph_utils folder. 2012-11-05 22:00:02 -05:00
graph.h
gui_core.h
gui_widgets.h Added some preprocessor stuff to check if the user is #including 2016-01-17 11:54:31 -05:00
hash_map.h
hash_set.h
hash_table.h
hash.h Added count_bits() and hamming_distance() 2013-01-21 17:06:27 -05:00
image_io.h Add webp support (#2565) 2022-04-19 07:52:12 -04:00
image_keypoint.h Added the binned_vector_feature_image. 2013-04-01 22:59:33 -04:00
image_processing.h Move shape_predictor_trainer to a separate header (#599) 2017-05-20 09:37:40 -04:00
image_transforms.h Added random_cropper 2016-09-04 19:10:15 -04:00
invoke.h Added bind_front() and bind_back() (#2705) 2023-01-04 07:38:36 -05:00
iomanip
iosfwd
iosockstream.h Just removed double __ from the inclusion guard names. 2014-07-18 21:46:24 -04:00
iostream
is_kind.h Added is_array template. 2012-03-10 15:20:16 -05:00
istream
LICENSE.txt
linker.h Turned linker into a single implementation component. 2012-11-18 10:47:59 -05:00
locale
logger.h
lsh.h Added a set of new LSH based hashing functions meant for use 2013-03-14 20:01:30 -04:00
lz77_buffer.h
lzp_buffer.h
manifold_regularization.h Moved more graph tools into the graph_utils folder. 2012-11-05 22:00:02 -05:00
map.h
math.h stft(), istft(), stftr() and istftr() (#2627) 2022-08-09 09:00:06 -04:00
matrix.h Added a file that defines a new generic image interface for images in dlib. 2014-07-17 19:23:43 -04:00
md5.h
media.h FFmpeg : examples (#2764) 2023-04-12 22:47:58 -04:00
member_function_pointer.h Turned the member_function_pointer into a single implementation component. 2012-11-17 23:16:55 -05:00
memory_manager_global.h
memory_manager_stateless.h
memory_manager.h
metaprogramming.h Added bind_front() and bind_back() (#2705) 2023-01-04 07:38:36 -05:00
misc_api.h Added locally_change_current_dir 2014-04-26 15:35:45 -04:00
mlp.h
noncopyable.h C++11 features (#778) 2017-08-25 05:40:22 -04:00
numeric_constants.h stft(), istft(), stftr() and istftr() (#2627) 2022-08-09 09:00:06 -04:00
numerical_integration.h minor cleanup and formatting 2013-05-24 21:34:24 -04:00
opencv.h Added some preprocessor stuff to check if the user is #including 2016-01-17 11:54:31 -05:00
optimization.h Added isotonic_regression. 2018-02-28 10:03:24 -05:00
optional.h update docs and some cleanup 2023-09-17 21:26:29 -04:00
ostream
overloaded.h FFMPEG wrappers: dlib::ffmpeg::decoder and dlib::ffmpeg::demuxer (#2707) 2023-01-29 20:17:34 -05:00
pipe.h
pixel.h update docs and some cleanup 2023-09-17 21:26:29 -04:00
platform.h Rename POSIX macro to DLIB_POSIX to avoid name clashes with some libraries. 2020-09-01 09:30:52 -04:00
python.h Added numpy_image templated class that makes a numpy array 2018-04-28 08:52:25 -04:00
quantum_computing.h
queue.h
rand.h
random_forest.h cleanup 2018-03-18 12:52:03 -04:00
ref.h
reference_counter.h
revision.h.in Added (and configure in CMake) a revision.h.in containing the version number 2015-09-19 20:00:43 +01:00
scope.h [scope] Adding scope_exit (#2875) 2023-10-06 22:57:11 -04:00
sequence.h
serialize.h Miscellaneous cleanup and refresh (#2661) 2022-09-19 08:18:39 -04:00
server.h Just renamed these files 2012-11-07 19:40:57 -05:00
set_utils.h
set.h
simd.h Just removed double __ from the inclusion guard names. 2014-07-18 21:46:24 -04:00
sliding_buffer.h Added a circular_buffer object. It is like sliding_buffer except it can 2012-03-06 20:53:37 -05:00
smart_pointers_thread_safe.h Replace shared_ptr_thread_safe with std::shared_ptr (#590) 2017-05-13 14:05:23 -04:00
smart_pointers.h Fixed grammar 2017-08-22 22:02:19 -04:00
sockets.h
sockstreambuf.h Just removed double __ from the inclusion guard names. 2014-07-18 21:46:24 -04:00
sort.h
sparse_vector.h Just removed double __ from the inclusion guard names. 2014-07-18 21:46:24 -04:00
sqlite.h Added a C++ wrapper for SQLite. 2011-09-23 22:35:07 -04:00
sstream
stack_trace.cpp Updated to use thread_local instead of old thread_specific_data class. 2017-12-01 20:15:16 -05:00
stack_trace.h Fixed stack trace macro 2017-12-01 19:53:57 -05:00
stack.h
static_map.h
static_set.h
statistics.h Added the following functions: 2014-09-14 20:18:37 -04:00
std_allocator.h Added some code to workaround a bug in certain versions of gcc. 2012-12-05 19:29:38 -05:00
stl_checked.h
string.h
svm_threaded.h Added some preprocessor stuff to check if the user is #including 2016-01-17 11:54:31 -05:00
svm.h Added auto_train_rbf_classifier() 2018-06-06 22:43:12 -04:00
sync_extension.h
test_for_odr_violations.cpp Fixed spelling and improved error message. 2018-02-28 21:03:58 -05:00
test_for_odr_violations.h Fixed spelling and improved error message. 2018-02-28 21:03:58 -05:00
threads.h Added guards so dlib::async code isn't pulled in when using old versions of visual studio (since they don't support c++11). 2016-08-04 21:12:00 -04:00
time_this.h Fixed error in TIME_THIS(). It was still printing in seconds when it said 2017-11-01 16:25:32 -04:00
timeout.h Turned timeout into a single implementation style object. Therefore, now it 2012-11-17 17:47:35 -05:00
timer.h Just renamed the timer source files. 2012-11-18 12:54:23 -05:00
timing.h Fixed timing print() so the output scales are set correctly. 2017-11-02 10:24:25 -04:00
tokenizer.h
tuple.h Just removed double __ from the inclusion guard names. 2014-07-18 21:46:24 -04:00
type_safe_union.h
type_traits.h update docs and some cleanup 2023-09-17 21:26:29 -04:00
uintn.h Minor changes to avoid compiler warnings from gcc in some cases 2013-12-27 11:59:12 -05:00
unicode.h
unordered_pair.h Treat warnings as errors (#2490) 2022-04-12 18:53:52 -04:00
utility.h dlib::optional (#2815) 2023-07-08 09:12:56 -04:00
vectorstream.h Added unserialize. 2016-01-23 19:42:48 -05:00
windows_magic.h Added a #define for _NO_W32_PSEUDO_MODIFIERS so that windows.h won't #define IN or OUT 2014-04-22 20:52:26 -04:00
xml_parser.h Turned the xml_parser into a single implementation component. 2012-11-17 23:51:24 -05:00