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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
greg
Posts: 5
Joined: 2019-02-26T07:43:12-07:00
Authentication code: 1152

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

Post 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 ?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post 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.
snibgo's IM pages: im.snibgo.com
greg
Posts: 5
Joined: 2019-02-26T07:43:12-07:00
Authentication code: 1152

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

Post 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 ?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post 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.
snibgo's IM pages: im.snibgo.com
greg
Posts: 5
Joined: 2019-02-26T07:43:12-07:00
Authentication code: 1152

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

Post by greg »

Inkscape crash when i use the export function.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post 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?
snibgo's IM pages: im.snibgo.com
greg
Posts: 5
Joined: 2019-02-26T07:43:12-07:00
Authentication code: 1152

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

Post 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
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

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

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
greg
Posts: 5
Joined: 2019-02-26T07:43:12-07:00
Authentication code: 1152

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

Post 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.
Post Reply