Yeah imagemagick would be great for this. But unfortunately it's not easy to install or bundle in an app. I needed a "ready to use out of the box" solution.
I tried to do a static build of imagemagick's "convert" for osx. No luck so far.
Do you have any experience in this field?