From 798f7ee27534d033a8417fb16d626b28e8f08682 Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Tue, 30 Oct 2018 09:46:50 +0000 Subject: [PATCH] Adding comments --- codecs/mozjpeg_enc/mozjpeg_enc.cpp | 2 ++ src/custom-els/RangeInput/index.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/codecs/mozjpeg_enc/mozjpeg_enc.cpp b/codecs/mozjpeg_enc/mozjpeg_enc.cpp index 5afbaeca..a2a31db5 100644 --- a/codecs/mozjpeg_enc/mozjpeg_enc.cpp +++ b/codecs/mozjpeg_enc/mozjpeg_enc.cpp @@ -143,6 +143,8 @@ val encode(std::string image_in, int image_width, int image_height, MozJpegOptio jpeg_c_set_bool_param(&cinfo, JBOOLEAN_TRELLIS_Q_OPT, opts.trellis_opt_table); jpeg_c_set_int_param(&cinfo, JINT_TRELLIS_NUM_LOOPS, opts.trellis_loops); + // A little hacky to build a string for this, but it means we can use set_quality_ratings which + // does some useful heuristic stuff. std::string quality_str = std::to_string(opts.quality); if (opts.separate_chroma_quality && opts.color_space == JCS_YCbCr) { diff --git a/src/custom-els/RangeInput/index.ts b/src/custom-els/RangeInput/index.ts index 0b7c684b..0fb985f7 100644 --- a/src/custom-els/RangeInput/index.ts +++ b/src/custom-els/RangeInput/index.ts @@ -57,6 +57,7 @@ class RangeInputElement extends HTMLElement { this.insertBefore(this._input, this.firstChild); this._valueDisplay = this.querySelector('.' + style.valueDisplay) as HTMLDivElement; + // Set inline styles (this is useful when used with frameworks which might clear inline styles) this._update(); }