Convert images in CMYK to RGB inside PDF

Q: I'm currently working with your Java PDF SDK, and I cannot find how
to convert an image in CMYK to RGB.

I've tried googling and searching your KB, but I still cannot find any
reasonable way to do this.
If you could supply a working example or even a hint as to how I can
do this, it would be greatly appreciated.

A: You could use ‘pdftron.PDF.Image.Image2RGB’ filter along the lines
of ElementReaderAdv sample:

After you convert image data to RGB you can add it to the existing PDF
document using pdftron.PDF.Image.Create(...) - along the lines of

Finally you can swap the old CMYK image with RGB using

For example: