]> Creatis software - gdcmData.git/blob - JDDICOM_Sample2-dcmdjpeg.txt
Add jpeg with defined length for sequence of fragments
[gdcmData.git] / JDDICOM_Sample2-dcmdjpeg.txt
1 This is not the decompression gone wrong, this is the image being incorrectly
2 encoded. The problem is that the JPEG bitstream in this image is in YCbCr
3 color space, but DICOM PhotometricInterpretation claims that the color space
4 is RGB.
5
6 In dcmdjpeg, you have a command line option --conv-always that enforces a
7 conversion from YCbCr to RGB and another option --conv-lossy that enforces
8 this conversion for lossy JPEG only. Both solve the problem with this image.
9
10 Both option are not enabled by default, though, because they would cause some
11 legitimate DICOM images to be displayed incorrectly. We prefer that the
12 default behaviour of our tools is to correctly process correct data. Options
13 that are needed for incorrect objects and would cause certain correct objects
14 to be processed incorrectly (even if only in rare cases) are never enabled by
15 default.
16