A bit of const-correctness in the save jpg/png functions.