diff options
Diffstat (limited to 'image_writer.c')
-rw-r--r-- | image_writer.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/image_writer.c b/image_writer.c index 3aca95d963..750dd15426 100644 --- a/image_writer.c +++ b/image_writer.c @@ -51,6 +51,20 @@ const struct image_writer_opts image_writer_opts_defaults = { .jpeg_quality = 85, }; +#undef OPT_BASE_STRUCT +#define OPT_BASE_STRUCT struct image_writer_opts + +const struct m_sub_options image_writer_conf = { + .opts = (m_option_t[]) { + OPT_INTRANGE("jpeg-quality", jpeg_quality, 0, 0, 100), + OPT_INTRANGE("png-compression", png_compression, 0, 0, 9), + OPT_STRING("filetype", filetype, 0), + {0}, + }, + .size = sizeof(struct image_writer_opts), + .defaults = &image_writer_opts_defaults, +}; + struct image_writer_ctx { const struct image_writer_opts *opts; const struct img_writer *writer; |