Re: [Gdcm2] YBR_PARTIAL_422 and JPEG Baseline support
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: Mihail I. <mih...@go...> - 2022-01-12 12:23:48
|
Аt first sight seems that JPEG decoder has no problems with the file, good news. A little issue might be that it looks like YBR2RGB conversion has some artifacts, it works well with YBR_FULL and YBR_FULL_422, but some colors of YBR_PARTIAL_422 are wrong. Here is the result https://drive.google.com/file/d/1Wv8MBmn81i8EAahUT5FIinxFSb_q66a_/view?usp=sharing Right image: colors-spaces were overridden (current behavior) and then converted with YBR2RGB cinfo.jpeg_color_space = JCS_UNKNOWN cinfo.out_color_space = JCS_UNKNOWN Left image produced by encoder directly, color-spaces are not overridden cinfo.jpeg_color_space = JCS_YCbCr cinfo.out_color_space = JCS_RGB BTW, DCMTK's dcmcjpeg makes the same assumption and has exactly the same issue, tried many options, always got the same result as left image. Weasis opens image well. Just FYI, it depends of course what is the desired result, not a request to change something. Kind regards, Mikhail |