summaryrefslogtreecommitdiffstats
path: root/video/image_writer.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/image_writer.h')
-rw-r--r--video/image_writer.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/video/image_writer.h b/video/image_writer.h
index f6d3b58f87..c22606ed65 100644
--- a/video/image_writer.h
+++ b/video/image_writer.h
@@ -22,20 +22,20 @@ struct mp_log;
struct image_writer_opts {
int format;
- int high_bit_depth;
+ bool high_bit_depth;
int png_compression;
int png_filter;
int jpeg_quality;
- int jpeg_optimize;
- int jpeg_smooth;
- int jpeg_dpi;
- int jpeg_progressive;
- int jpeg_baseline;
- int jpeg_source_chroma;
- int webp_lossless;
+ bool jpeg_source_chroma;
+ bool webp_lossless;
int webp_quality;
int webp_compression;
- int tag_csp;
+ double jxl_distance;
+ int jxl_effort;
+ char *avif_encoder;
+ char *avif_pixfmt;
+ char **avif_opts;
+ bool tag_csp;
};
extern const struct image_writer_opts image_writer_opts_defaults;
@@ -48,6 +48,9 @@ const char *image_writer_file_ext(const struct image_writer_opts *opts);
// Return whether the selected format likely supports >8 bit per component.
bool image_writer_high_depth(const struct image_writer_opts *opts);
+// Return whether the selected format likely supports non-sRGB colorspaces
+bool image_writer_flexible_csp(const struct image_writer_opts *opts);
+
// Map file extension to format ID - return 0 (which is invalid) if unknown.
int image_writer_format_from_ext(const char *ext);
@@ -65,7 +68,7 @@ int image_writer_format_from_ext(const char *ext);
*/
bool write_image(struct mp_image *image, const struct image_writer_opts *opts,
const char *filename, struct mpv_global *global,
- struct mp_log *log);
+ struct mp_log *log, bool overwrite);
// Debugging helper.
void dump_png(struct mp_image *image, const char *filename, struct mp_log *log);