This repository was archived by the owner on Dec 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 30123012 const textureMax = findTextureMinMax ( image ) ;
30133013
30143014 // Encode the gainmap
3015- const encodingResult = encode ( {
3015+ const encodingResult = await encode ( {
30163016 image,
30173017 maxContentBoost : Math . max . apply ( this , textureMax ) // this will encode the full HDR range
30183018 } ) ;
30193019
30203020 // obtain the RAW RGBA SDR buffer and create an ImageData
3021- const sdrImageData = new ImageData ( encodingResult . sdr . toArray ( ) , encodingResult . sdr . width , encodingResult . sdr . height ) ;
3021+ const sdrImageData = new ImageData ( await encodingResult . sdr . toArray ( ) , encodingResult . sdr . width , encodingResult . sdr . height ) ;
30223022 // obtain the RAW RGBA Gain map buffer and create an ImageData
3023- const gainMapImageData = new ImageData ( encodingResult . gainMap . toArray ( ) , encodingResult . gainMap . width , encodingResult . gainMap . height ) ;
3023+ const gainMapImageData = new ImageData ( await encodingResult . gainMap . toArray ( ) , encodingResult . gainMap . width , encodingResult . gainMap . height ) ;
30243024
30253025 // parallel compress the RAW buffers into the specified mimeType
30263026 const mimeType = 'image/jpeg' ;
You can’t perform that action at this time.
0 commit comments