Update codecs/mozjpeg/dec/mozjpeg_dec.cpp

Co-authored-by: Ingvar Stepanyan <rreverser@google.com>
This commit is contained in:
Surma
2020-08-24 14:00:38 +01:00
committed by GitHub
parent 8cd811cafd
commit 75275a5596

View File

@@ -42,7 +42,7 @@ val decode(std::string image_in) {
// Step 7: release JPEG compression object
auto data = Uint8ClampedArray.new_(typed_memory_view(output_size, &output_buffer[0]));
auto data = Uint8ClampedArray.new_(typed_memory_view(output_buffer.size(), output_buffer.data()));
auto js_result = ImageData.new_(data, cinfo.output_width, cinfo.output_height);
// This is an important step since it will release a good deal of memory.