cr2-raw
Native image and meta data retrieval from Canon RAW .CR2 files.
Usage
This is just a quick example that demonstrates retrieving the preview image from a .CR2 file.
var cr2Raw = fs = ; // Read RAW.var raw = ; // Save preview image.fs;
API
cr2raw
Static
meta
MetaDefinitions describe how to find a specific tag including the tagId, which IFD's to search for it and a parse function to use on the return value.
ImageWidth
Description
Retrieves 'Exif.Photo.PixelXDimension' from the EXIF IFD and
returns it as an int
.
ImageHeight
Description
Retrieves 'Exif.Photo.PixelYDimension' from the EXIF IFD and
returns it as an int
.
DateTaken
Description
Retrieves 'Exif.Photo.DateTimeOriginal' from the EXIF IFD and
returns it as a Date
.
Construction
cr2Raw(filePath)
Parameters
filePath
string - Path to .CR2 file
Description
Basic constructor used to parse a .CR2 file ready for use.
Methods
previewImage()
Description
Returns a Buffer
containing the bytes which make up the preview image for the
file.
thumbnailImage()
Description
Returns a Buffer
containing the bytes which make up the thumbnail image for
the file.
fetchMeta(metaDefinition)
Parameters
metaDefinition
object - Meta data definition (see MetaDefinitions)
Description
Retrieves and returns a piece of meta data depending on the passed MetaDefintion.