How to save a packed image from a script
The docs reference unpack

Given an image with the super descriptive name 'Untitled':



&gt;&gt;&gt; bpy.ops.image.unpack(id='Untitled')
Warning: AutoPack is enabled, so image will be packed again on file save
Info: Saved packed file to: /home/zeffii/Downloads/textures/dances_packed.png

{'FINISHED'}


If you look in console you'll see where it saved to. 

But it is possible for certain to use plain old .save() too. Opening a .blend where the image is packed I did

bpy.data.images['Untitled'].filepath = '/home/zeffii/Desktop/some_name.png'
bpy.data.images['Untitled'].save()


And it stored straight to desktop

Things I don't know

How to save as a different file type, and how to force a different save directory for the unpack command.