You can do as follows:
curl http://aa.com/a.jpg | convert - 00001.jpeg
curl http://bb.com/b.jpg | convert - 00002.jpeg
The file are then in JPEG format:
user@host:~# file 00001.jpeg
file.jpeg: JPEG image data, JFIF standard 1.01
user@host:~# file 00002.jpeg
file.jpeg: JPEG image data, JFIF standard 1.01
That's it.