Created attachment 186973 [details] WPG graphic that opens in Draw with wrong colors Some WPG (WordPerfect Graphics) files open with wrong colors in LibreOffice Draw (and also in the libwpg tools that LibreOffice uses for WPG graphics). Here is an example (attached) that has pale pink and orange colors when opened in WordPerfect or Corel Presentations, but dark purple colors in LibreOffice. I posted a ticket about this on the libwpg SourceForge page, but no one has responded to it. It would be good if a LibreOffice developer could look into this, as there is no other native software for viewing WPG graphics under Linux or macOS.
I should have said that this was one of the graphics that shipped with WordPerfect Office 7 and other versions.
Created attachment 186974 [details] screenshot on LO 7.6 Here's what I get on pc Debian x86-64 with master sources updated today. Would it be possible you attach a screenshot of the expected and what you get to compare?
Fridrich/David: interested in this one since it concerns libwpg?
Created attachment 186983 [details] Same WPG opened in Corel Presentations X3 Here is the same graphic opened in Corel Presentations X3; it looks exactly the same in the latest version of Presentations (2021(.
Comment on attachment 186983 [details] Same WPG opened in Corel Presentations X3 I forgot to add that what I get under Windows and macOS is exactly the same as the image you posted from Debian.
Thank you for the feedback, let’s put this one to NEW
Sorry - third try: I mean that what I get from LibreOffice in Windows and macOS is exactly the same as what you posted from Debian LibreOffice. I've also built wpg2svg on Windows and macOS, and both give the same wrong colors that you posted from Debian LibreOffice and that I see in Windows and macOS LibreOffice. All versions of Corel Presentations and WordPerfect show the correct (mostly light yellow) colors. The name of the WPG (created by Novell or Corel) is YELOEYE, meaning that the fish is a yelloweye rockfish, which looks like this: https://www.fisheries.noaa.gov/species/yelloweye-rockfish The colors are correct in Corel's software, but wrong in LibreOffice.
Created attachment 186988 [details] black color in Line properties If we test the Line properties, it is a black color.
Tested in Version: 7.3.7.2 / LibreOffice Community Build ID: 30(Build:2) CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.2 Calc: threaded
It looks like a gradient, which might not be implemented. I will have a quick look.
Created attachment 186989 [details] The YELOEYE.WPG file converted by Corel app to WPG1 format
Created attachment 186990 [details] The WPG1 converted file (YELOONE.WPG) opened in LibreOffice (screenshot)
To explain the attachments: I used Corel Presentations Graphic to convert the problem WPG file (which is in WPG2 format) to WPG1 format (the format used by WPDOS 5.1). When I opened the resulting WPG1 file in LibreOffice, the colors were correct. So something seems to be wrong with WPG2 conversion that doesn't apply to WPG1 conversion, but I'm only guessing.
WPG1 format from comment 11 opens OK in LibreOffice, the fish is yellow, so it seems we don't suport WPG2 format.
https://sourceforge.net/p/libwpg/code/ci/91bd3ecbdf1be5b3c96b706440e45a17b73bdb5f/ And it looks the same in WPG2 and WPG1.
Thank you Fridrich for the quick fix! em36: just to sure there's no misunderstanding, after Fridrich's fix, the next steps to wait for are: 1) the release of a new version of libwpg 2) a patch in LO in master sources (= dev branch) to use the release of libwpg 3) a patch in LO in 7.5 branch to use the release of libwpg 4) the LO release of a version from 7.5 branch which includes the patch About 7.5 branch, here's the schedule https://wiki.documentfoundation.org/ReleasePlan/7.5 Steps 3 and 4 depends on the schedule of libwpg release. Eg: if the new version libwpg is released in december, it won't be in a 7.5 version of LO since last LO 7.5 is EOL is in november. (Fridrich: if I'm wrong or if I forgot to tell something important, don't hesitate to tell and also, if you got a release date in mind for new version of libwpg which includes the fix, please share the info ! :-))
(In reply to Julien Nabet from comment #16) > 1) the release of a new version of libwpg I have done that right now. So, the libwpg-0.3.4 with the fix and some other stuff can be downloaded from the libwpg.sf.net > 2) a patch in LO in master sources (= dev branch) to use the release of > libwpg > 3) a patch in LO in 7.5 branch to use the release of libwpg > 4) the LO release of a version from 7.5 branch which includes the patch I let people with the appropriate rights to do it. For those that use the system libwpg, rebuilding libwpg would be the only thing that is needed.
Thank you again for this quick and complete fix! I've built wpg2svg and wpd2odt successfully on macOS and Windows, and the output is now exactly right. (And if you decide to make it possible to build PerfectSpot someday, many of us will be grateful because there is no other separate utility for viewing and converting WPG files.)
(In reply to Fridrich Strba from comment #17) > (In reply to Julien Nabet from comment #16) > > 1) the release of a new version of libwpg > > I have done that right now. So, the libwpg-0.3.4 with the fix and some other > stuff can be downloaded from the libwpg.sf.net Great! >... > I let people with the appropriate rights to do it. I got a patch locally, I asked on dev list if someone could upload the file on dev-www.libreoffice.org (see https://lists.freedesktop.org/archives/libreoffice/2023-April/090328.html) (thanks to this, external/libwpg/rpath.patch can be removed)
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0c0c9a0dd8a7b102315ab1075f78a0f1f3397b67 tdf#155057: Wrong colors in some WPG2 (well rendered in WPG1) It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Julien, thanks for this quick fix. Now the fish is yellow, as expected. Verified with Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 98f766004e29ea35eef6fcf3a4c28696b95f6c90 CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/d9db13de3e200841dea75dec9d5c03bf2f8a1c02 tdf#155057: Wrong colors in some WPG2 (well rendered in WPG1) It will be available in 7.5.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to BogdanB from comment #21) > Julien, thanks for this quick fix. You're welcome but the fix comes from Fridrich and Caolán fixed the Boost pb in Jenkins (pb that I hadn't had when building locally), so thank you to them!