Completed
Last Updated: 26 Jun 2023 13:21 by ADMIN
Release R2 2023 SP1
ADMIN
Deyan
Created on: 06 Jun 2017 13:41
Category: PDFViewer
Type: Bug Report
1
PdfViewer: CMYK JPEG image is rendered incorrect when BitmapImage is initialized with PixelFormat differing from CMYK
Default DctDecode implementation uses System.Windows.Media.Imaging.BitmapImage in order to get the image pixels. However, when the image uses some complex colorspace (for instance Separation based on CMYK) the BitmapImage is initialized with a different format and we use System.Windows.Media.Imaging.FormatConvertedBitmap in order to get the pixels in CMYK colorspace. There seems to be some issue with these calculations as the resulting image has incorrect pixels.

WORKAROUND: You may inherit DctDecode class in order to implement custom decoder and call DecodeWithJpegDecoder method from the base class as mentioned in the note of this documentation article:

http://docs.telerik.com/devtools/wpf/controls/radpdfviewer/customization-and-extensibility/customize-pdf-rendering

A sample implementation of these custom decoder may be seen below:

public class CustomDctDecode : DctDecode
{
    public override byte[] Decode(PdfObject decodedObject, byte[] inputData, DecodeParameters parms)
    {
        return DecodeWithJpegDecoder(inputData);
    }
}
1 comment
ADMIN
Peshito
Posted on: 26 Jun 2023 13:21

Hello,

This item will be available in R2 2023 SP1 Release. 

It is also available with Document Processing Libraries (DPL) version 2023.2.703 or higher.

Regards,
Peshito
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.