Made texture atlas, error with png writing