mirror of
https://github.com/mpv-player/mpv
synced 2025-02-03 21:52:12 +00:00
image_writer: add dump_png() function as debugging helper
This commit is contained in:
parent
c62efc52c6
commit
caa64363c5
@ -318,3 +318,10 @@ int write_image(struct mp_image *image, const struct image_writer_opts *opts,
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
void dump_png(struct mp_image *image, const char *filename)
|
||||
{
|
||||
struct image_writer_opts opts = image_writer_opts_defaults;
|
||||
opts.format = "png";
|
||||
write_image(image, &opts, filename);
|
||||
}
|
||||
|
@ -48,3 +48,6 @@ const char *image_writer_file_ext(const struct image_writer_opts *opts);
|
||||
*/
|
||||
int write_image(struct mp_image *image, const struct image_writer_opts *opts,
|
||||
const char *filename);
|
||||
|
||||
// Debugging helper.
|
||||
void dump_png(struct mp_image *image, const char *filename);
|
||||
|
Loading…
Reference in New Issue
Block a user