This should've been added in #2925.
The only doubt I have around the function name:
- `load_rgb_alpha_image`: following the `rgb_alpha_pixel` in dlib
- `load_rgba_image`: shorter and maybe nicer?
MMX is not actually used by dlib and including the header breaks SIMD support detection and usage on platforms that support SSE but not MMX, such as emcc
* WIP: preparation for JPEG XL support
* jxl: add loading support
* update jxl abstract
* add support for saving jxl (lossless not working)
* everything works except setting lossless explicitly
* remove unused header
* fix wrong quality logic
* remove debugging statements
* fix lossless encoding
* improve support for grayscale images
* use JXL instead of JPEGXL everywhere
* oops do not make libjxl a requirement
* update years
* silence some warnings
* simplify loader fast path logic
* allow python to save jxl and webp
* update error message with supported formats
* Allow setting image quality in Python
The setting is ignored where it does not make sense.
* round quality in JPEG saver
* improve error message in CMake
* add jxl support to imglab
* add Davis's suggestion
Co-authored-by: Davis E. King <davis685@gmail.com>
* Apply suggestions from code review
Co-authored-by: Davis E. King <davis685@gmail.com>
* make sure grayscale is 8 bit
* update abstract: JPEG XL can store grayscale images
* add more methods to query basic info from JXL
* documentation formatting
* Apply Davis' suggestions
---------
Co-authored-by: Davis E. King <davis685@gmail.com>
* Return shortcut in disturb_colors
No need to do anything if both gamma and color magnitudes are set to 0.
* Fix typo
This happens for being lazy and making the change directly from GitHub...
This allows us to greatly simplify the self supervised learning example:
- the computation in user code was a bit too distracting
- avoids duplicated computation/allocation of this matrix
- avoids edge case where net outputs are zero due to trainer synchronization
* 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>
* initial commit
* is this enough?
* is this enough docs? I'm not great at writing docs
---------
Co-authored-by: pf <pf@me>
Co-authored-by: pf <pf@pf>