-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathget-sharp-options.ts
41 lines (39 loc) · 1.19 KB
/
get-sharp-options.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { S3StorageOptions, SharpOptions } from './types'
function getSharpOptions(options: S3StorageOptions): SharpOptions {
return {
resize: options.resize,
composite: options.composite,
modulate: options.modulate,
toFormat: options.toFormat,
extract: options.extract,
trim: options.trim,
flatten: options.flatten,
extend: options.extend,
negate: options.negate,
rotate: options.rotate,
flip: options.flip,
flop: options.flop,
blur: options.blur,
sharpen: options.sharpen,
gamma: options.gamma,
grayscale: options.grayscale,
greyscale: options.greyscale,
normalize: options.normalize,
normalise: options.normalise,
convolve: options.convolve,
threshold: options.threshold,
toColourspace: options.toColourspace,
toColorspace: options.toColorspace,
withMetadata: options.withMetadata,
linear: options.linear,
median: options.median,
tint: options.tint,
removeAlpha: options.removeAlpha,
bandbool: options.bandbool,
boolean: options.boolean,
joinChannel: options.joinChannel,
extractChannel: options.extractChannel,
ensureAlpha: options.ensureAlpha,
}
}
export default getSharpOptions