Jon Simpson – The depths of OS X: SIPS:
"That solution is sips. The “scriptable image processing system” by self-description and a tool built right into Mac OS X, using all of the format support and output support available to the OS.
sips -s format jpeg test.png --out test.jpg"
Here's the Apple man page for sips.