Using the LEGO Star Wars texture extractor / inserter here;
http://www.spared-life.com/
Also, you may wish to read this (written before the program at spared-life was finalised)
http://www.hansen.net.nz/lswtutorial/
Page 1, Section 6 "Perl Scripts" and Page 2, Section 7 " Extracting the .DDS texture file(s) from the .hgp archive" is now superseded by the spared-life tool which does everything for you, just point it to the game's giant .dat file.