Page 1 of 1

Convert .emf image to very big .png,.tiff,.jpg...

Posted: 2019-02-27T01:55:36-07:00
by greg
Hi,

i need to convert a .emf file to a very big image used as terrain for a simulation software.
i used this command:
magick convert -density 16 image.emf image.png

it works but if i use:
magick convert -density 72 image.emf image.png
it will be too slow and crash

is it possible to speed up process ?
is it possible to convert only one part of an .emf file (x,y,width,height) in order to split the image and process ?
if yes, how ?

Re: Convert .emf image to very big .png,.tiff,.jpg...

Posted: 2019-02-27T05:47:16-07:00
by snibgo
How large is the image, in pixels? How much memory do you have?

I suspect you don't have enough memory for the pixels, so they are stored on disk. See http://www.imagemagick.org/script/comma ... .php#limit for methods to limit memory usage, which can prevent disk thrashing.

I don't think IM has any method for converting only part of the EMF file.

Re: Convert .emf image to very big .png,.tiff,.jpg...

Posted: 2019-02-27T06:10:04-07:00
by greg
With:
magick convert -density 32 image_ramadi.emf image_ramadi.png
it took me about 1 hour to do the calculation and as a result an image of 22750 x 22761 pixels and 1.6 MB.
it slow down my computer too.

i have an Intel Xenon E3-1246 3.50GHz with 16Go of RAM.

i need very very big image which can have 1million x 1million pixels. Spliting image is necessary but before the computation of the big image to avoid too much computation.

Do you know any other tools than ImageMagick to do this job ?

Re: Convert .emf image to very big .png,.tiff,.jpg...

Posted: 2019-02-27T07:48:06-07:00
by snibgo
greg wrote:Do you know any other tools than ImageMagick to do this job ?
Inkscape. If the image is entirely vector, that's the obvious tool.

Re: Convert .emf image to very big .png,.tiff,.jpg...

Posted: 2019-02-27T08:12:30-07:00
by greg
Inkscape crash when i use the export function.

Re: Convert .emf image to very big .png,.tiff,.jpg...

Posted: 2019-02-27T08:38:09-07:00
by snibgo
If you have problems with Inkscape, you should raise that with Inkscape people.

Did you split the image and export just part of it?

Re: Convert .emf image to very big .png,.tiff,.jpg...

Posted: 2019-02-28T00:31:41-07:00
by greg
Did you split the image and export just part of it?
With image magick i don't know how to do that.
With Inkscape, i try to export the image without any settings and Inkscape close imediately

Re: Convert .emf image to very big .png,.tiff,.jpg...

Posted: 2019-02-28T02:49:24-07:00
by dlemstra
It looks like it is possible to read part of the exr file on Windows. Could you open an issue on GitHub to request support for this? Not sure if this is possible but we should give it a try.

Re: Convert .emf image to very big .png,.tiff,.jpg...

Posted: 2019-02-28T06:00:21-07:00
by greg
It's possible to load only one part of an .emf file using the win32 API.
i think i will create my own c++ program to convert one .emf file to several splited .bmp files.