PNG and MNG image support fix

Version V1 V2  
1 by Sebastian Spaeth View Revision