Bug 113696 - XHTML Export: Convert exotic image formats to png
Summary: XHTML Export: Convert exotic image formats to png
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Samuel Mehrbrodt (allotropia)
URL:
Whiteboard: target:6.1.0 target:6.0.0.1
Keywords:
: 61096 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-11-07 15:14 UTC by Samuel Mehrbrodt (allotropia)
Modified: 2021-05-19 09:32 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example document (10.48 KB, application/vnd.oasis.opendocument.text)
2017-11-07 15:14 UTC, Samuel Mehrbrodt (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Mehrbrodt (allotropia) 2017-11-07 15:14:17 UTC
Created attachment 137598 [details]
Example document

When exporting a document to XHTML, images should be converted to a format that browsers can read, like png, jpeg or gif.

Open attached file, then export to XHTML (File->Export).
The image is a metafile and cant be read by browsers.

HTML export converts this to gif.
Comment 1 Regina Henschel 2017-11-08 13:35:42 UTC
The problem is deeper. LibreOffice should not generate svm-files at all. Quote from the spec:
Note: While the image data may have an arbitrary format, vector graphics should be stored in the [SVG] format and bitmap graphics in the [PNG] format.

There should be a very good reason to use a different format. And in the view of interoperability the svm format is very bad.

Nevertheless, for XHTML it is indeed not apposite. But why png? That is a raster graphic format and does not fit well to svm. You loose scalability. For the svm-file in the attached example the export to svg works well.
Comment 2 Regina Henschel 2017-11-08 14:03:05 UTC
Please notice bug 72966 for erroneously producing svm.
Comment 3 Regina Henschel 2017-11-08 20:32:31 UTC
If you save those file, which have fake "svm", in ODF 1.2 extended, then the fake "svm" file is removed and only the png is there. That could help to sort out the fake "svm" from true svm, and make files with fake "svm" ready for XHTML.
Comment 4 Commit Notification 2017-11-30 16:43:12 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=32efde5cef2b8516a9decd0bf7091d7def1da971

tdf#113696 Add mimetype to image element

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2017-12-01 07:21:23 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=38602abc2d2b59bc3644e37797b9b1bc779fd993

tdf#113696 Write replacement graphic also to flat odf

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2017-12-01 07:25:10 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f20ba8466b0df5c80f7663eb1d639f31973dbece

tdf#113696 Add mimetype also to fallback graphic

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2017-12-01 07:25:17 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9e827c4eadd951b1609107ee3772de2853e37692

tdf#113696 XHTML Export: Prefer fallback graphic

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Samuel Mehrbrodt (allotropia) 2017-12-01 08:04:25 UTC
So this has been solved by adding a fallback graphic (png) to the ODF. The SVM will still be written as svg might not have all the features we require.
Comment 9 Commit Notification 2017-12-01 08:55:21 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bb1fd2c9819d1ee5ba26c181d8fea8272b89b673

Unit test for tdf#113696

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2017-12-04 08:20:53 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5dc757b5d25894c08792036043b8714fa28a8b87&h=libreoffice-6-0

tdf#113696 Add mimetype to image element

It will be available in 6.0.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2017-12-04 08:21:02 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=58822e6f1686eac7a8a7c028ea8f233493594437&h=libreoffice-6-0

tdf#113696 Write replacement graphic also to flat odf

It will be available in 6.0.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2017-12-04 08:21:08 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8dae93c0b8a075dee1319efff4e81d90f3f13b2b&h=libreoffice-6-0

tdf#113696 Add mimetype also to fallback graphic

It will be available in 6.0.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2017-12-04 08:21:14 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e96f95fd70c4293f85a022257c757dded6f1ec84&h=libreoffice-6-0

tdf#113696 XHTML Export: Prefer fallback graphic

It will be available in 6.0.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2017-12-04 08:22:38 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b89834591f83058649dfa839297346ccc6ed689d&h=libreoffice-6-0

Unit test for tdf#113696

It will be available in 6.0.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2017-12-04 12:48:47 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=282bc5a824d103dcf4b19c9cf83698a2334e2e34

Related tdf#113696 Unit test for Writer images fallback graphic

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2017-12-04 14:25:37 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a0647dfdbbea483ed3a8372b7a54e1934dfa1fe5

Related tdf#113696 Write fallback graphic for fodf files also

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2017-12-04 15:18:58 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5219c6eccb55874c8a8670f44c3f03558384f9b7&h=libreoffice-6-0

Related tdf#113696 Write fallback graphic for fodf files also

It will be available in 6.0.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2017-12-04 16:17:49 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6ac72f5f7584adc11341c6986dc4bf4d5f7f933f&h=libreoffice-6-0

Related tdf#113696 Unit test for Writer images fallback graphic

It will be available in 6.0.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Xisco Faulí 2021-05-19 09:32:32 UTC
*** Bug 61096 has been marked as a duplicate of this bug. ***