Converting to HTML reduces image size.

asked 2019-03-22 17:02:43 +0200

yes147 gravatar image

When I run the command...

soffice --convert-to html --convert-images-to "jpg" test.docx

The resulting images are reduced in quality ONLY when they are a processed image that consists of a group of images. I was hoping that converting to jpg may increase the resolution (since they get converted to gif by default). But the output image formats of processed group images still come out as .gif. The original unprocessed images are jpg and have much higher resolution, when I unzip them manually from a .docx file. Also, the resolutions of the processed group images are much higher when viewing from LibreOffice in the original docx format. Is there any way to convert-to html while retaining high resolution on processed group images?

Any help would be greatly appreciated. Thank you, and thank you for creating LibreOffice. =)

edit retag flag offensive close merge delete


There's no option that controls the resolution used to convert complex objects to images when exporting to HTML. A grouped data is a single complex object from the PoV of LO; so resolution of underlying images does not really matter; there's no guarantee e.g. that their pixels align (pixels sizes might differ; their positioning is done to Writer's grid of twips/100ths of mm), so combined picture does not have any "natural" resolution.

You are welcome to come with an enhancement request.

Mike Kaganski gravatar imageMike Kaganski ( 2019-03-23 10:44:50 +0200 )edit

Thanks for the response Mike~~ I've added an enhancement request~~ ^^ I posted some details about modifying the source code. Any help would be greatly appreciated if you have a minute~~ Thanks and have a good day~~ ^^

yes147 gravatar imageyes147 ( 2019-03-27 16:02:55 +0200 )edit

Thanks for your effort and contribution! Please post your suggested change to gerrit, so that we could review it and have a fruitful discussion there.

Please see: I'm glad to help you solve specific questions setting up your environment and posting to gerrit on #libreoffice-dev on IRC; however, I'm not sure I can provide much feedback on implementing the fix - but then, having it on gerrit allows those who knows it better to help you.

Mike Kaganski gravatar imageMike Kaganski ( 2019-03-27 16:12:15 +0200 )edit

Awesome~~ Thank you for the feedback~~ I'll check the Development wiki out and post to gerrit when I get the chance~~ ^^

yes147 gravatar imageyes147 ( 2019-03-27 16:27:00 +0200 )edit