NEP 4.3.0
NetCDF Expansion Pack
Loading...
Searching...
No Matches
dicomjpeglosslessprecision.c File Reference

JPEG data-precision detection for JPEG Lossless frames. More...

#include "config.h"
#include "dicomjpeglossless.h"

Functions

int dicom_jpeg_lossless_precision (const void *src, size_t src_len)

Detailed Description

JPEG data-precision detection for JPEG Lossless frames.

This is a plain byte scan of the raw JPEG stream for a Start-Of-Frame marker and does not depend on any JPEG decoding library, so it is always available whenever DICOM support is built, independent of whether the JPEG Lossless codec (HAVE_DICOM_LOSSLESS) is available.

Author
Edward Hartnett
Date
2026-07-28

Function Documentation

◆ dicom_jpeg_lossless_precision()

int dicom_jpeg_lossless_precision ( const void * src,
size_t src_len )

Determine the sample bit precision of a JPEG Lossless frame by scanning for its Start-Of-Frame marker.

Parameters
srcRaw JPEG Lossless stream.
src_lenLength of src in bytes.
Returns
Sample precision in bits (8, 12 or 16), or -1 if no SOF marker is found.
Author
Edward Hartnett