My project test work on 4 DICOM files, on this files the image data begin with a offset of 1680, so it's necessary to skip DICOM header.
The attached project work well for 3 files:
8-bit J2K Lossy Gray.dcm
8-bit J2K Lossless Gray.dcm
8-bit JPEG Lossy Gray.dcm
but failed with this:
8-bit JPEG Lossless Gray.dcm
I obtain this exception:
"Project raised exception class 'EImagingError" with message:
JPEG Error: 61 (Unsupported JPEG process: SOF type $%02x)"
The problem is present under Windows, Linux and Mac OSX.
In debugging I found that the exception is generated by follow code in imjdmarker.pas@2221:
...
M_SOF3, { Lossless, Huffman }
M_SOF5, { Differential sequential, Huffman }
M_SOF6, { Differential progressive, Huffman }
M_SOF7, { Differential lossless, Huffman }
M_JPG, { Reserved for JPEG extensions }
M_SOF11, { Lossless, arithmetic }
M_SOF13, { Differential sequential, arithmetic }
M_SOF14, { Differential progressive, arithmetic }
M_SOF15: { Differential lossless, arithmetic }
ERREXIT1(j_common_ptr(cinfo), JERR_SOF_UNSUPPORTED, cinfo^.unread_marker);
...
where cinfo^.unread_marker = M_SOF3 (195) so I think that the decompress algorithm cannot manipulate Lossless Huffman compression?
The attached project work well for 3 files:
8-bit J2K Lossy Gray.dcm
8-bit J2K Lossless Gray.dcm
8-bit JPEG Lossy Gray.dcm
but failed with this:
8-bit JPEG Lossless Gray.dcm
I obtain this exception:
"Project raised exception class 'EImagingError" with message:
JPEG Error: 61 (Unsupported JPEG process: SOF type $%02x)"
The problem is present under Windows, Linux and Mac OSX.
In debugging I found that the exception is generated by follow code in imjdmarker.pas@2221:
...
M_SOF3, { Lossless, Huffman }
M_SOF5, { Differential sequential, Huffman }
M_SOF6, { Differential progressive, Huffman }
M_SOF7, { Differential lossless, Huffman }
M_JPG, { Reserved for JPEG extensions }
M_SOF11, { Lossless, arithmetic }
M_SOF13, { Differential sequential, arithmetic }
M_SOF14, { Differential progressive, arithmetic }
M_SOF15: { Differential lossless, arithmetic }
ERREXIT1(j_common_ptr(cinfo), JERR_SOF_UNSUPPORTED, cinfo^.unread_marker);
...
where cinfo^.unread_marker = M_SOF3 (195) so I think that the decompress algorithm cannot manipulate Lossless Huffman compression?