I am using gm for node. I would like know the equivalent Javascript of the ImageMagick CLI command:
convert /path/to/source.png -format "%@" info:-
This will output the trim data, resulting in something like:
2672x3579+1115+725
I initially assumed the gm equivalent would be:
gm('/path/to/source.png').identify('%@', (err, result) => {
console.log(result)
})
But this just returns the source file size without trimming whitespace.
5000x5000+0+0