Photoshop files alpha fix

Code based on targainput.cpp as per Brecht's suggestion.
Photoshop output is not supported at the moment, so this patch address the input code only.