I am sure that there are more complicated ways to do this but, if you just get the offset info, you can use grep
:
$ convert -debug Coder longyan_1.png -trim longyan_1.trimed.png 2>&1 | grep "Setting up oFFs chunk"
Setting up oFFs chunk with x=181, y=118, units=0
If you want to shorten and/or reformat the output still more, you can use sed
. For example:
$ convert -debug Coder longyan_1.png -trim longyan_1.trimed.png 2>&1 | sed -n '/Setting up oFFs chunk/ s/.*x=/x=/p'
x=181, y=118, units=0