Description: Embedding or linking an XYB image (created from XNView jpegli encoder with XYB option) has the colour displayed wrongly. Saving as PDF likewise, in the current situation it creates PDFs with the colour wrong even in the latest Acrobat Reader, unless there's a way to achieve that it Libreoffice will need to ensure conversion to RGB on Export (maybe with some kind of alert) even if it would normally just embed losslessly. Steps to Reproduce: 1.Empty document 2.Drag XYB jpeg image in Actual Results: Colours greeny Expected Results: Normal colours Reproducible: Always User Profile Reset: No Additional Info: Used the correct colour profile
Please attach a sample file, reduce the size as much as possible without private information, and paste the information in Menu/Help/About LibreOffice, there is a copy icon.
Here we go, a zip of the odt file with image dragged in, and the image also as a separate item - https://www.paintdrawer.co.uk/temp/bugxyb169563.zip Version: 25.8.3.2 (X86_64) Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e CPU threads: 8; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster; VCL: win Locale: en-GB (en_GB); UI: en-GB Calc: CL threaded
Just importing the image shows the color change. Reproducible Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 620(Build:0) CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: threaded
I don't know that this can be implemented. ODF has no support for xyB image encoding, and IIANM internally images are always converted to our RGBA BMP. Filter support for reading in xyB would have to be implemented. Does seem to be Python libs but found nothing worked up for C++ use. And even if we could filter import image source from xyB, I don't think it would be required to export document content using the format. @Quikee, has this format come up for adoption, would extension to ODF be needed?
The issue here is that we don't apply the ICC profile after importing a JPEG or other images to convert it to sRGB as we should and is expected. There is already a bug (I think from Gabor) that the imported image has different colors, which is the same bug - just not using a profile with xyb colorspace, which is specific to jpegli, but probably something like AdobeRGB profile and the colors come out all wrong. We don't need to extend ODF for this. We already have lcms2 library as an external library as we probably use it for something else, so we could use that to apply the icc color profile from jpeg images as well, but we probably need iccjpeg to get the icc profile from jpeg images. Probably this could be a nice GSoC project - I'll write it into the idea page.