
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
__ ________ _______
____ ____ ___ ____ / / / /_ __/ / / ___/
/ __ \/ __ \/ _ \/ __ \/ /_/ / / /_ / /\__ \
/ /_/ / /_/ / __/ / / / __ / / / /_/ /___/ /
\____/ .___/\___/_/ /_/_/ /_/ /_/\____//____/
/_/
openHTJS is a JavaScript library for decoding HT codestreams. HT codestreams are JPEG 2000 codestreams that use the ultra-fast block decoder specified in Rec. ITU-T T.814 | ISO/IEC 15444-15.
It is built on top of the OpenJPH library, which it compiles to JavaScript using Emscripten. It is heavily inspired by the openjphjs project.
Bugs are tracked at https://github.com/sandflow/openhtjs/issues.
openHTJS does not depend on external libraries. It requires support for WebAssembly and ES6 modules.
See src/test/site for an example that fetches a codestream and decodes into a Canvas element.
HT.js is an ES6 module that exposes a single Decoder class:
import {Decoder} from "./HT.js"
Decoder(codestreamSize)
codestreamSize is the size of the codestream in bytes that will be decoder. The codestream is not required to be complete.A Decoder object must instantiated for each codestream to be decoded.
UInt8Array getCodestreamBuffer()
Returns a view to the codestream buffer, which the client must fill with the codestream, e.g.:
let decoder = new Decoder(j2c_bytes.length);
const decoder_buffer = decoder.getCodestreamBuffer();
decoder_buffer.set(j2c_bytes);
readHeader()
Parses the codestream header. Must be called before any method, other than getCodestreamBuffer() is called.
Size getDecodedImageSize(int decompositionLevel)
Returns the decoded image size at decomposition level decompositionLevel. decompositionLevel = 0 means the full image resolution.
Size startDecoding(int decompositionLevel, bool requestPlanar)
Starts the decoding process.
decompositionLevel indicates that the decomposition level to which the image is decoded. decompositionLevel = 0 indicates that
the full image is decoded.
requestPlanar indicates whether successive calls to decodeLine* output RRR..., GGG..., BBB..., RRR...,... or RGBRGBRGB..., ... (false). requestPlanar must be true if the encoded image contains any downsampled components, and false if the
codestream uses a color transform.
UInt32Array decodeLineAsUnsignedSamples()
Decodes a complete line of the image as a sequence of UInt32 values.
int getDecodedComponentNumber()
Returns the index of the component last decoded by decodeLineAsUnsignedSamples(). Can only be called if requestPlanar is true.
FrameInfo getImageInfo()
Returns information about the image.
int getNumDecompositions()
Returns the number of decomposition levels available.
bool isReversible()
Indicates whether the image coding was lossless.
int getProgressionOrder()
Returns the progression order.
Point getDownSample(int i)
Returns the horizontal and vertical downsampling factor for the ith component.
Point getImageOffset()
Returns the image offset.
bool isUsingColorTransform()
Indicates whether the codestream uses color transforms.
bool isDownsamplingUsed()
Indicates whether any component of the codestream is downsampled.
struct Size {
uint32_t width;
uint32_t height;
}
struct FrameInfo {
uint16_t width;
uint16_t height;
uint8_t bitsPerSample;
uint8_t componentCount;
bool isSigned;
}
struct Point {
uint32_t x;
uint32_t y;
}
openHTJS uses docker to run emscripten.
Clone the repository:
git clone --recursive https://github.com/sandflow/openhtjs.git
Build the distribution under dist:
npm run build
Build the demo web page to build/site:
/bin/sh scripts/setup_site.sh
FAQs
High-throughput JPEG 2000 (Rec. ITU-T T.814 | ISO/IEC 15444-15) decoder
We found that openht demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.