Ask Your Question
0

Convert-to jpg wmf on Linux, resolution issue.

asked 2019-09-05 20:45:00 +0200

edufmass gravatar image

Hello, first of all, I don't speak English very well, I apologize if I make any mistake writing.

I am developing a website that import xlsx files and gets all the images. Some xlsx are generated by a third party software in windows and when images are extracted I get files in wmf format.

For example I want to convert a wmf image (136x77 px) to jpg and I use the command:

libreoffice --headless --convert-to jpg uploads/temp/image.wmf --outdir uploads/converted/

As result I get a jpg image (794x1123 px) with white background and the tiny wmf img centered.

How do I convert to jpg keeping size of original wmf?

The xlsx file has inside many images with different sizes.

Thank you! Best regards, Edu.-

edit retag flag offensive close merge delete

Comments

3

Try using dedicated image processing utilities for the conversion, like ImageMagick.

Mike Kaganski gravatar imageMike Kaganski ( 2019-09-05 21:17:15 +0200 )edit

Hi Mike, is a shared web hosting, I get libreoffice comand enabled. I will try to test with command convert. Thank you.

edufmass gravatar imageedufmass ( 2019-09-06 16:08:25 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-09-16 16:19:23 +0200

mattia.b89 gravatar image

I know LO has many issues with that kind of image (EMF-WMF); here the meta-bug report.
Thus, I have reason to believe this is a bug.

Anyway, I am the same way as @Mike Kanganski: LO is the wrong app to handle with images;
use other tools like GIMP, imagemagick or online services, ...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-09-05 20:45:00 +0200

Seen: 38 times

Last updated: Sep 16