From RAW to JPEG: converting photographs