1
0
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:
wm4 2012-10-27 17:30:26 +02:00
parent c62efc52c6
commit caa64363c5
2 changed files with 10 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);