Bug 158939 - share/config themes : a few svg files are simply wrapped around a huge png image
Summary: share/config themes : a few svg files are simply wrapped around a huge png image
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+ Master
Hardware: All All
: medium normal
Assignee: Buovjaga
URL:
Whiteboard: target:24.8.0
Keywords:
Depends on:
Blocks: Win-Installer-Smaller Installer-Linux
  Show dependency treegraph
 
Reported: 2023-12-30 21:07 UTC by Jérôme
Modified: 2024-02-01 20:35 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
example from share/config/images_sukapura_svg.zip : only 916 xml chars + "xlink:href="data:image/png;base64, (1.06 MB, image/svg+xml)
2023-12-30 21:07 UTC, Jérôme
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jérôme 2023-12-30 21:07:43 UTC
Created attachment 191661 [details]
example from share/config/images_sukapura_svg.zip : only 916 xml chars + "xlink:href="data:image/png;base64,

Found in nightly build LibreOfficeDev_24.8.0.0.alpha0_Win_x86-64.msi.
Comment 1 Jérôme 2023-12-31 08:11:03 UTC
This problem is also in : lodevbasis24.8-images_24.8.0.0.alpha0-1_amd64.deb

Inside opt/libreofficedev24.8/share/config/images_sukapura_svg.zip, I found the same file :
sd/res/presenterscreen-BorderToolbarTop.svg
Comment 2 Jérôme 2023-12-31 09:48:41 UTC
I found the below svg files which contain a large png image (with possible more svg work than just wrapping).

images_karasa_jaga_svg.zip :
cmd/32/documentation.svg
cmd/sc_documentation.svg
cmd/lc_documentation.svg

images_sukapura_dark_svg.zip :
svx/res/a11y_check_issues_found.svg
sd/res/presenterscreen-BorderToolbarTop.svg
cmd/sc_bmpmask.svg
chart2/res/valueaxissteppedlines_52x60.svg
chart2/res/valueaxisstepped3d_52x60.svg
chart2/res/pieexploded_52x60.svg
chart2/res/pie3dexploded_52x60.svg
chart2/res/valueaxissteppedboth_52x60.svg
chart2/res/pie_52x60.svg
chart2/res/pie_52x60.svg
chart2/res/donut3d_52x60.svg
chart2/res/donutexploded_52x60.svg

images_sukapura_svg.zip :
svx/res/a11y_check_issues_found.svg
sd/res/presenterscreen-BorderToolbarTop.svg
cmd/sc_bmpmask.svg
chart2/res/valueaxissteppedlines_52x60.svg
chart2/res/valueaxisstepped3d_52x60.svg
chart2/res/pieexploded_52x60.svg
chart2/res/pie3dexploded_52x60.svg
chart2/res/valueaxissteppedboth_52x60.svg
chart2/res/pie_52x60.svg
chart2/res/pie_52x60.svg
chart2/res/donut3d_52x60.svg
chart2/res/donutexploded_52x60.svg

images_colibre_svg.zip :
vcl/res/pen.svg

images_colibre_dark_svg.zip :
vcl/res/pen.svg
Comment 3 Buovjaga 2024-01-25 17:09:08 UTC
With a quick check, I can see that some icons mistakenly include reference images. I can work on this.
Comment 4 Commit Notification 2024-01-27 19:47:04 UTC
Ilmari Lauhakangas committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ace5f5cbee7ea2c21ff9a3fe9b859b83a006edd6

tdf#158939 icon-themes: remove leftover reference images from SVGs

It will be available in 24.8.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.
Comment 5 Buovjaga 2024-01-28 08:12:43 UTC
(In reply to Jérôme from comment #2)
> images_karasa_jaga_svg.zip :
> cmd/32/documentation.svg
> cmd/sc_documentation.svg
> cmd/lc_documentation.svg

I did not touch these as the images are there to provide the texture for the notebook. Of course someone could rework them as the image seems to be nearly 400 kB.

By using this script https://gist.github.com/wbotelhos/d48d0cd1b279f9995f341021537644b8 for comparing the hash of my commit with the hash of the previous one, I got 2,899,372 bytes as the file size difference, so quite a huge win.

You can find all the .svgs containing image elements with this:

git grep -l '<image' 'icon-themes*.svg'

Current list:

icon-themes/karasa_jaga_svg/cmd/32/addressbooksource.svg
icon-themes/karasa_jaga_svg/cmd/32/autopilotmenu.svg
icon-themes/karasa_jaga_svg/cmd/32/currencyfield.svg
icon-themes/karasa_jaga_svg/cmd/32/dbnewreport.svg
icon-themes/karasa_jaga_svg/cmd/32/dbnewreportautopilot.svg
icon-themes/karasa_jaga_svg/cmd/32/dbreportdelete.svg
icon-themes/karasa_jaga_svg/cmd/32/dbreportedit.svg
icon-themes/karasa_jaga_svg/cmd/32/dbreportopen.svg
icon-themes/karasa_jaga_svg/cmd/32/dbreportrename.svg
icon-themes/karasa_jaga_svg/cmd/32/dbviewreports.svg
icon-themes/karasa_jaga_svg/cmd/32/documentation.svg
icon-themes/karasa_jaga_svg/cmd/32/dsbinsertcolumns.svg
icon-themes/karasa_jaga_svg/cmd/32/dsbinsertcontent.svg
icon-themes/karasa_jaga_svg/cmd/32/executereport.svg
icon-themes/karasa_jaga_svg/cmd/32/reportnavigator.svg
icon-themes/karasa_jaga_svg/cmd/lc_addressbooksource.svg
icon-themes/karasa_jaga_svg/cmd/lc_autopilotmenu.svg
icon-themes/karasa_jaga_svg/cmd/lc_changepicture.svg
icon-themes/karasa_jaga_svg/cmd/lc_currencyfield.svg
icon-themes/karasa_jaga_svg/cmd/lc_documentation.svg
icon-themes/karasa_jaga_svg/cmd/lc_sbaexecutesql.svg
icon-themes/karasa_jaga_svg/cmd/sc_addressbooksource.svg
icon-themes/karasa_jaga_svg/cmd/sc_autopilotmenu.svg
icon-themes/karasa_jaga_svg/cmd/sc_bezierappend.svg
icon-themes/karasa_jaga_svg/cmd/sc_bezierinsert.svg
icon-themes/karasa_jaga_svg/cmd/sc_currencyfield.svg
icon-themes/karasa_jaga_svg/cmd/sc_documentation.svg
icon-themes/karasa_jaga_svg/cmd/sc_showlicense.svg
icon-themes/karasa_jaga_svg/dbaccess/res/reports_32.svg
icon-themes/karasa_jaga_svg/sd/res/doctext.svg
icon-themes/karasa_jaga_svg/wizards/res/portrait_32.svg

Of these, the icons related to reports have an image of a vertical red squiggly line with unnecessary amount of detail. The image weighs about 100 kB. I've known about this for years and guess I could finally do something about it, so I will keep this assigned.
Comment 6 Commit Notification 2024-01-28 21:49:35 UTC
Ilmari Lauhakangas committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3be785e088cc0aa726509cf6b52b1d3b03817172

tdf#158939 icon-themes/karasa_jaga_svg: simplify some db icons

It will be available in 24.8.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.
Comment 7 Buovjaga 2024-01-29 06:41:20 UTC
Remaining icons with images:

icon-themes/karasa_jaga_svg/cmd/32/addressbooksource.svg
icon-themes/karasa_jaga_svg/cmd/32/currencyfield.svg
icon-themes/karasa_jaga_svg/cmd/32/documentation.svg
icon-themes/karasa_jaga_svg/cmd/lc_addressbooksource.svg
icon-themes/karasa_jaga_svg/cmd/lc_changepicture.svg
icon-themes/karasa_jaga_svg/cmd/lc_currencyfield.svg
icon-themes/karasa_jaga_svg/cmd/lc_documentation.svg
icon-themes/karasa_jaga_svg/cmd/lc_sbaexecutesql.svg
icon-themes/karasa_jaga_svg/cmd/sc_addressbooksource.svg
icon-themes/karasa_jaga_svg/cmd/sc_bezierappend.svg
icon-themes/karasa_jaga_svg/cmd/sc_bezierinsert.svg
icon-themes/karasa_jaga_svg/cmd/sc_currencyfield.svg
icon-themes/karasa_jaga_svg/cmd/sc_documentation.svg
icon-themes/karasa_jaga_svg/cmd/sc_showlicense.svg
icon-themes/karasa_jaga_svg/wizards/res/portrait_32.svg