Convert-to jpg wmf on Linux, resolution issue.

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,

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

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

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 @Mike2 Kanganski: LO is the wrong app to handle with images;
use other tools like GIMP, imagemagick or online services, …