Fix image conversion script