mirror of
https://github.com/mpv-player/mpv
synced 2025-01-12 09:59:44 +00:00
screenshots: drop some useless jpeg writer options
This commit is contained in:
parent
8d3c826ad8
commit
d737939f1f
@ -47,8 +47,6 @@ const struct image_writer_opts image_writer_opts_defaults = {
|
||||
.jpeg_quality = 90,
|
||||
.jpeg_optimize = 100,
|
||||
.jpeg_smooth = 0,
|
||||
.jpeg_dpi = 72,
|
||||
.jpeg_progressive = 0,
|
||||
.jpeg_baseline = 1,
|
||||
.tag_csp = 1,
|
||||
};
|
||||
@ -60,8 +58,6 @@ const struct m_sub_options image_writer_conf = {
|
||||
OPT_INTRANGE("jpeg-quality", jpeg_quality, 0, 0, 100),
|
||||
OPT_INTRANGE("jpeg-optimize", jpeg_optimize, 0, 0, 100),
|
||||
OPT_INTRANGE("jpeg-smooth", jpeg_smooth, 0, 0, 100),
|
||||
OPT_INTRANGE("jpeg-dpi", jpeg_dpi, M_OPT_MIN, 1, 99999),
|
||||
OPT_FLAG("jpeg-progressive", jpeg_progressive, 0),
|
||||
OPT_FLAG("jpeg-baseline", jpeg_baseline, 0),
|
||||
OPT_INTRANGE("png-compression", png_compression, 0, 0, 9),
|
||||
OPT_INTRANGE("png-filter", png_filter, 0, 0, 5),
|
||||
@ -191,10 +187,6 @@ static int write_jpeg(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp)
|
||||
cinfo.write_JFIF_header = TRUE;
|
||||
cinfo.JFIF_major_version = 1;
|
||||
cinfo.JFIF_minor_version = 2;
|
||||
cinfo.density_unit = 1; /* 0=unknown, 1=dpi, 2=dpcm */
|
||||
cinfo.X_density = ctx->opts->jpeg_dpi;
|
||||
cinfo.Y_density = ctx->opts->jpeg_dpi;
|
||||
cinfo.write_Adobe_marker = TRUE;
|
||||
|
||||
jpeg_set_defaults(&cinfo);
|
||||
jpeg_set_quality(&cinfo, ctx->opts->jpeg_quality, ctx->opts->jpeg_baseline);
|
||||
@ -204,9 +196,6 @@ static int write_jpeg(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp)
|
||||
cinfo.comp_info[0].h_samp_factor = 1 << ctx->original_format.chroma_xs;
|
||||
cinfo.comp_info[0].v_samp_factor = 1 << ctx->original_format.chroma_ys;
|
||||
|
||||
if (ctx->opts->jpeg_progressive)
|
||||
jpeg_simple_progression(&cinfo);
|
||||
|
||||
jpeg_start_compress(&cinfo, TRUE);
|
||||
|
||||
while (cinfo.next_scanline < cinfo.image_height) {
|
||||
|
Loading…
Reference in New Issue
Block a user