Created attachment 164169 [details] Images of the problem When saving a document with a .svg file in it with the .fodt format, the quality of the svg file decrease. 1) I created a .odt file and add a .svg file in it. 2) I saved the .odt file, close it, and reopen it. 3) Now i saved the file into a .fodt file. 4) By opening the .fodt file, the .svg file is pixelated.
There's a workaround for this: if you open the advanced configuration (Tools > Options, LibreOffice > Advanced, Open advanced configuration) and set a setting called GenerateThumbnail to false it won't happen anymore (for newly inserted images).
Hello guillaume.guillet, Thank you for reporting the bug. I can confirm that the bug is present in master. I can't confirm what is written in comment 1. The behavior is still faulty. Version: 7.1.0.0.alpha1+ (x64) Build ID: 418c63dff5db2005bbc4dbfc92b56778f89cea8b CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win Locale: cs-CZ (cs_CZ); UI: en-GB Calc: CL First version, where is the bug: Version: 6.1.0.1 (x64) Build ID: 378e26bd4f22a135cef5fa17afd5d4171d8da21a CPU threads: 4; OS: Windows 10.0; UI render: default; Locale: cs-CZ (cs_CZ); Calc: CL The last version, where it is work ok: Version: 6.0.7.2 (x64) Build ID: 78c12ce5f2b8960f18b204a7ea82f971769f1679 CPU threads: 4; OS: Windows 10.0; UI render: default; Locale: cs-CZ (cs_CZ); Calc: CL
Could be a duplicate of https://bugs.documentfoundation.org/show_bug.cgi?id=80219 *** This bug has been marked as a duplicate of bug 80219 ***
Hi again, the bug still appear with version 7.3.3.2 x64 with the same steps. The potential duplicate of https://bugs.documentfoundation.org/show_bug.cgi?id=80219 has been marked as wont fix but this bug is still clearly there (note that I don't think it was a duplicate).
Created attachment 180531 [details] A svg file that been used to find the bug
I can reproduce this on macOS with a recent development build: Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 55cd20e6228a06836285c14ca6726adb1bb4ffcb CPU threads: 10; OS: Mac OS X 13.0.1; UI render: Skia/Metal; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded Looking into it a bit, the issue seems to stem from the fact that LibreOffice saves a PNG version of the SVG image for use as a fallback. So it produces code like the following in the .fodt file: <draw:frame ...> <draw:image draw:mime-type="image/svg+xml"> <office:binary-data>... </office:binary-data> </draw:image> <draw:image draw:mime-type="image/png"> <office:binary-data>... </office:binary-data> </draw:image> </draw:frame> The first <draw:image> element within the <draw:frame> is supposed to represent the preferred format of the image, in this case SVG. But when LibreOffice reads the .fodt file back in, it seems to ignore the SVG version and use the pixellated PNG version instead. If I manually edit the XML code in the .fodt file to either remove the PNG version or put the PNG version before the SVG version, then LibreOffice will use the SVG version of the image. So it seems like the issue is that LibreOffice is preferring the last <draw:image> element rather than the first one when reading a .fodt file.
I identified a workaround for this: In the options under LibreOffice > Advanced, Open Expert Configuration, search for AddReplacementImage and set it to false. This will prevent generation of the fallback PNG version of SVG images, so the problem does not arise.
This regression is already tracked in bug 123396, marking as duplicate. *** This bug has been marked as a duplicate of bug 123396 ***