Webassembly ImageMagick & outputfilename in cmdline

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
knicknic
Posts: 2
Joined: 2018-07-12T23:57:40-07:00
Authentication code: 1152

Webassembly ImageMagick & outputfilename in cmdline

Post by knicknic »

I recompiled ImageMagick for WebAssembly, allowing it to run in your browser. You can see a sample cmdline project that uses it at https://knicknic.github.io/imagemagick
However I do not understand output filenames.

the command I was trying to run was (which you can experiment in the above sample url)

Code: Select all

convert * -flatten -crop x20% +repage -quality 100 -scene 0 -set filename:mysize %t %[filename:mysize]-%d.jpeg
I tried to split a filename of abcdefghijklmn.jpg thinking this would generate abcdefghijklmn-0.jpg, abcdefghijklmn-1.jpg, ...
However I got file name abcdefgh0.jpg. This was unexpected for 2 reasons.
  • 1. I did not abcdefghijklmn, but the shortened abcdefgh
  • My guess is that in the browser it does not detect that it is capable of longer than 8 character file names. I was wondering does anyone know where the detection for what character support your file system has is?
  • 2. I did not get '-'.
How would I get the expected abcdefghijklmn-0.jpg, abcdefghijklmn-1.jpg, ...

Lastly, any thoughts on client side ImageMagick using webassembly more info at https://github.com/KnicKnic/WASM-ImageMagick?

Thanks,
KnicKnic
knicknic
Posts: 2
Joined: 2018-07-12T23:57:40-07:00
Authentication code: 1152

Re: Webassembly ImageMagick & outputfilename in cmdline

Post by knicknic »

This turned out to be a bug in ImageMagick. It is currently fixed. For more info see https://github.com/ImageMagick/ImageMagick/issues/1483
Post Reply