1 // Copyright (c) the JPEG XL Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style
4 // license that can be found in the LICENSE file.
6 // Functions for writing a JPEGData object into a jpeg byte stream.
8 #ifndef LIB_JXL_JPEG_DEC_JPEG_DATA_WRITER_H_
9 #define LIB_JXL_JPEG_DEC_JPEG_DATA_WRITER_H_
16 #include "lib/jxl/jpeg/dec_jpeg_serialization_state.h"
17 #include "lib/jxl/jpeg/jpeg_data.h"
22 // Function type used to write len bytes into buf. Returns the number of bytes
24 using JPEGOutput = std::function<size_t(const uint8_t* buf, size_t len)>;
26 Status WriteJpeg(const JPEGData& jpg, const JPEGOutput& out);
31 #endif // LIB_JXL_JPEG_DEC_JPEG_DATA_WRITER_H_