Skip to content
This repository was archived by the owner on Dec 21, 2025. It is now read-only.

Commit c1eb1a7

Browse files
Update Texture Viewer
1 parent 31c9a67 commit c1eb1a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

viewers/templates/Texture Viewer.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3012,15 +3012,15 @@
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';

0 commit comments

Comments
 (0)