raw

package module
v0.0.0-...-3644259 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2015 License: MIT Imports: 5 Imported by: 0

README

raw - Decoding RAW images in Go

For now this is just for Fujifilm's RAW format. The header is read into a struct along with the embedded jpeg image. Exif data is parsed for the embedded jpeg.

raf := raw.ReadRAF("/path/to/raw/file.RAF")

// Optionally write jpeg to disk
raf.WriteJpeg("/path/to/ouput.jpeg")

// Read some exif value
fl := raf.Exif.Get(exif.FocalLength)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RAF

type RAF struct {
	Header struct {
		Magic         [16]byte
		FormatVersion [4]byte
		CameraID      [8]byte
		Camera        [32]byte
		Dir           struct {
			Version [4]byte

			Jpeg struct {
				IDX int32
				Len int32
			}
			// contains filtered or unexported fields
		}
	}
	Jpeg []byte
	Exif *exif.Exif
}

RAF is the Fuji raw file format

func ReadRAF

func ReadRAF(fname string) *RAF

ReadRAF makes a new RAF from a file

func (*RAF) WriteJpeg

func (r *RAF) WriteJpeg(w io.Writer)

WriteJpeg writes the raw preview jpeg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL