Documentation
¶
Index ¶
- Variables
- type Meta
- type RAW
- func (r *RAW) Aperture() float32
- func (r *RAW) Close() error
- func (r *RAW) FocalLength() float32
- func (r *RAW) Height() int
- func (r *RAW) ISOSpeed() float32
- func (r *RAW) Image() (image.Image, error)
- func (r *RAW) Make() string
- func (r *RAW) Metadata() []media.Metadata
- func (r *RAW) Model() string
- func (r *RAW) RawHeight() int
- func (r *RAW) RawWidth() int
- func (r *RAW) Shutter() float32
- func (r *RAW) Software() string
- func (r *RAW) Thumbnail() (image.Image, error)
- func (r *RAW) ThumbnailBytes() ([]byte, error)
- func (r *RAW) Timestamp() time.Time
- func (r *RAW) Width() int
- func (r *RAW) XMP() []byte
Constants ¶
This section is empty.
Variables ¶
var ContentTypes = regexp.MustCompile("^image/x-(adobe-dng|canon-cr2|canon-cr3|canon-crw|nikon-nef|nikon-nrw|sony-arw|sony-srf|sony-sr2|olympus-orf|panasonic-rw2|fuji-raf|pentax-pef|leica-rwl|sigma-x3f|samsung-srw|minolta-mrw|epson-erf|kodak-dcr|kodak-kdc|mamiya-mef|hasselblad-3fr|hasselblad-fff|phaseone-iiq|leaf-mos|casio-bay|raw)$")
Functions ¶
This section is empty.
Types ¶
type Meta ¶
type Meta struct {
// contains filtered or unexported fields
}
Meta is a single key/value metadata field from a RAW file. Keys follow XMP namespace conventions (tiff:Make, exif:ISOSpeedRatings, etc.).
func (*Meta) MarshalJSON ¶
type RAW ¶
type RAW struct {
// contains filtered or unexported fields
}
RAW wraps a libraw data handle for decoding RAW image files.
func (*RAW) FocalLength ¶
FocalLength returns the focal length in mm.
func (*RAW) Image ¶
Image demosaics and returns the full-resolution image. This is a slow operation; use Thumbnail for quick previews.
func (*RAW) Metadata ¶
Metadata returns key/value pairs for camera info and shooting parameters. Keys follow XMP namespace conventions (tiff:Make, exif:ISOSpeedRatings, etc.) and implement the media.Metadata interface.
func (*RAW) Thumbnail ¶
Thumbnail extracts and decodes the embedded preview image. This is fast since the thumbnail is pre-rendered inside the RAW file.
func (*RAW) ThumbnailBytes ¶
ThumbnailBytes returns the raw thumbnail bytes without decoding. For JPEG thumbnails (the common case) this can be passed directly to exif.Parse to extract embedded EXIF metadata.