dlemstra / magick-wasm

The WASM library for ImageMagick

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't open SVG files (or any other vector graphics)

adyster opened this issue · comments

magick-wasm version

0.0.27

Description

I'm unable to open SVG files. Same problem with pretty much every other vector graphic format. Throws an error.

Steps to Reproduce

Can test it with the demo documents app.

Images

Screenshot 2024-01-21 at 8 14 09 pm

I did not add support for SVG files because browsers tend to be better at this. I would advise you to draw the svg on a canvas and then read the image from that canvas.

Oh, ok. It comes up as one of the supported file formats in supportedFormats.

Yes, that works for SVG files. I was actually mainly interested in the other vector graphics formats such as Adobe Illustrator (AI), which is listed as a supported format too. Those unfortunately aren't supported natively with the browser. :-/

That are listed as a format but that doesn't mean the format is supported. I should probably make this more clear by renaming the property or remove some formats. I think I will need to remove formats that support reading by using an external executable.

Other vector formats are not supported because they require an external executable. And I cannot package a wasm version of Ghostscript due to licensing issue. It might be possible but not something I will invest time on anytime soon.