save image server-side with C