Project

General

Profile

Actions

Bug #658

closed

JPEG compression: Implement the 0xFF padding as per DICOM Standard

Added by Michael Onken about 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Library
Target version:
-
Start date:
2015-09-04
Due date:
% Done:

100%

Estimated time:
Module:
dcmjpeg, others?
Operating System:
Compiler:

Description

Implement the 0xFF padding as per DICOM Standard:
http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_A.4.html

"All items containing an encoded fragment shall be made of an even number of bytes greater or equal to two. The last fragment of a frame may be padded, if necessary, to meet the sequence item format requirements of the DICOM Standard.
Note:
  • Any necessary padding may be added in the JPEG or JPEG-LS compressed data stream as per ISO 10918-1 and ISO 14495-1 such that the End of Image (EOI) marker ends on an even byte boundary, or may be appended after the EOI marker, depending on the implementation.
  • ISO 10918-1 and ISO 14495-1 define the ability to add any number of padding bytes FFH before any marker (all of which also begin with FFH). It is strongly recommended that FFH padding bytes not be added before the Start of Image (SOI) marker.

Thanks to Mathieu Malaterre for the report.

Actions

Also available in: Atom PDF