Expand description
Turning RAW files into JPEGs that any SmugMug account can take.
RAW uploads need a SmugMug Source subscription. Without one, the uploader sends a JPEG instead: the full-size preview the camera embedded in the RAW file, with the RAW’s EXIF (capture date, camera, exposure, GPS, orientation) copied in when the preview has none of its own. That is the camera’s own rendering (picture style, white balance), without any edits made in a RAW editor, and is byte-for-byte the same each run.
When a file has no usable preview (DNGs from Adobe DNG Converter often
carry only a 1024 px one), the RAW data itself is converted with
rawler (LGPL-2.1): demosaiced, white balanced and converted to sRGB,
with no tone curve, so it looks flatter than the camera’s rendering.
Modules§
- exif
- Reading a RAW file’s EXIF so it can be written into the JPEG rendered
from it, which usually has none of its own. Writing is
little_exif’s job; reading is done here because RAW containers (CR3’s boxes, the Olympus and Panasonic TIFF variants) are outside what it parses. - jpeg
- Finding the JPEG previews cameras embed in RAW files.
Structs§
- Rendered
Jpeg - A RAW file rendered to JPEG, ready to upload.
Constants§
- MIN_
PREVIEW_ LONG_ EDGE - Previews with a shorter long edge than this are thumbnails, not photos, and aren’t uploaded in place of the RAW.
Functions§
- render_
jpeg - Render the RAW file at
pathto a JPEG (see the module docs). - render_
jpeg_ bytes - rendered_
file_ name - The file name a RAW file’s rendered JPEG is uploaded under:
IMG_1234.CR2becomesIMG_1234.jpg.