Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: blurry pixels bug for decoding of jpeg2000 #497

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/shared/decoders/decodeJPEG2000.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export function initialize(decodeConfig) {
async function decodeAsync(compressedImageFrame, imageInfo) {
await initialize();
const decoder = local.decoder;
const decodeLevel = 0;
const decodeLayer = 0;

// get pointer to the source/encoded bit stream buffer in WASM memory
// that can hold the encoded bitstream
Expand All @@ -55,8 +57,8 @@ async function decodeAsync(compressedImageFrame, imageInfo) {
encodedBufferInWASM.set(compressedImageFrame);

// decode it
decoder.decode();
// decoder.decodeSubResolution(decodeLevel, decodeLayer);
// decoder.decode();
decoder.decodeSubResolution(decodeLevel, decodeLayer);
// const resolutionAtLevel = decoder.calculateSizeAtDecompositionLevel(decodeLevel);

// get information about the decoded image
Expand Down