Thanks Luis , your suggestion about working with the files in examples directory worked for me , and plus the fact that png work with unsigned char. -Rashmi