cal images using c