I had a devil of a time figuring out how to extract my account picture from my Mac to a JPEG. Then I found an article which had the answer. Man… it’s ugly.
If you wish to extract a 320x320 version of your account picture you can do so by running the following command:
dscl . -read /Users/short_username JPEGPhoto | tail -1 | xxd -r -p > /PATH/TO/accountImage.jpg