erl_gm icon indicating copy to clipboard operation
erl_gm copied to clipboard

Add support for custom gm_opts

Open byronpc opened this issue 7 years ago • 4 comments

Add ability to set custom opts without the need to define it in the gm_options module everytime

byronpc avatar Oct 24 '17 02:10 byronpc

I think the problem can be resolved by just implementing the remaining options in this list: http://www.graphicsmagick.org/GraphicsMagick.html#opti.

nuex avatar Oct 25 '17 13:10 nuex

Or we make it so options are defined dynamically, remove the options clauses altogether, and leave it up to the developer to ensure their options are correct.

nuex avatar Oct 25 '17 13:10 nuex

The problem with implementing remaining options of gm is it's a temporary fix. As soon as new options are introduced in gm, we have to update the library again. I'm all with letting the developer define the options altogether, from a performance point of view, it will also be faster as you don't need to do all those translating and string manipulations, although we'd need to make note that it will break existing apps using your lib.

byronpc avatar Oct 26 '17 01:10 byronpc

or maybe even just expose another api where sending a string will ignore gm_options module instead?

:gm.convert('#{source}', '#{target}', '-strip -opt2 -opt3...')

byronpc avatar Oct 26 '17 01:10 byronpc