You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 17b342c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/gainmap.ts
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,7 @@ export class GainMap {
98
98
*/
99
99
setgamma(value: GainMapChannelValues){
100
100
constgamma=perChannel(value,'gamma');
101
+
// eslint-disable-next-line no-restricted-syntax -- a rule of the gain map's values, not a shared option
101
102
if(gamma.some(g=>g<=0))thrownewRangeError('The gain map\'s gamma must be above 0');
102
103
this.__gamma__=gamma;
103
104
}
@@ -140,6 +141,7 @@ export class GainMap {
140
141
* @param value Whether the boost applies in the SDR image's color space
141
142
*/
142
143
setuseBaseColorSpace(value: boolean){
144
+
// eslint-disable-next-line no-restricted-syntax -- the only boolean option that is validated
143
145
if(typeofvalue!=='boolean')thrownewTypeError('useBaseColorSpace must be a boolean');
144
146
this.__useBaseColorSpace__=value;
145
147
}
@@ -229,8 +231,10 @@ export class GainMap {
229
231
private__check__(): void{
230
232
// (each value is checked when it is set; these are the checks between them)
231
233
for(letc=0;c<3;c++)
234
+
// eslint-disable-next-line no-restricted-syntax -- a relation between two values of the gain map
232
235
if(this.__max__[c]<this.__min__[c])thrownewRangeError(`The gain map's max must be at least its min (${this.__max__[c]} < ${this.__min__[c]}; the values are checked together when the map is cloned or encoded)`);
233
236
if(this.__capacityMax__<=this.__capacityMin__)
237
+
// eslint-disable-next-line no-restricted-syntax -- a relation between two values of the gain map
234
238
thrownewRangeError(`The gain map's hdrCapacityMax (by default the largest max) must be above its hdrCapacityMin (${this.__capacityMax__} <= ${this.__capacityMin__})`);
0 commit comments