imagetopnm(): make sure the alpha component has same dimension as other components...