You can do it by hand, as I used to, or use recoverjpeg:
dmesg | tail
cd /tmp
sudo dcfldd if=/dev/sde1 of=pix.bin bs=1M count=100
recoverjpeg pix.bin
ristretto image00*
Nothing prizewinning, but better than no picture at all:

Note that you start by copying a reasonable chunk of the partition from the Memory Stick / (micro)SD Card first, to prevent a bad situation from getting worse.
Now I can remember the easy way the next time around this block …

























