dng

package
v0.0.0-...-988fb72 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	WhiteBalanceTemp int       // To override the white balance recorded by the camera
	Verbose          bool      // The DNG libraries full dump of metadata
	ImageKind        ImageKind // Set this to see Stage3 data
	// contains filtered or unexported fields
}

An Image holds all the parsed data from the DNG SDK, exposes bits of it as regular Go objects, and implements `image.Image`.

func (Image) At

func (img Image) At(x, y int) color.Color

func (Image) Bounds

func (img Image) Bounds() image.Rectangle

Implement image.Image

func (Image) CameraToPCS

func (img Image) CameraToPCS() Mat3

CameraToPCS returns the transform matrix from camera-native RGB into CIEXYZ(D50?). This isn't quite the DNG ForwardMatrix, because it also bundles the white reference adjustment (matrix `D` in the DNG spec)

func (Image) CameraWhite

func (img Image) CameraWhite() Vec3

CameraWhite returns an RGB color that should be white/neutral, given the white reference / color temperature used by DNG. (That info either comes from the camera via image metadata, or by an override arg set in `Neagtive`). This is basically the DNG AsShotNeutral.

func (Image) ColorModel

func (img Image) ColorModel() color.Model

func (Image) ExifExposureTime

func (img Image) ExifExposureTime() URat

func (Image) ExifFNumber

func (img Image) ExifFNumber() URat

func (Image) ExifISO

func (img Image) ExifISO() int

func (*Image) Free

func (img *Image) Free()

Free releases all memory associated with the negative ... hopefully

func (*Image) Load

func (img *Image) Load(filename string) error

New loads up the DNG file, and performs the DNG development process

func (Image) OriginalRawFileName

func (img Image) OriginalRawFileName() string

type ImageKind

type ImageKind int
const (
	// Stage 1: raw sensor readings. We don't try and turn them into an image.
	// Stage 2: linearized raw sensor readings, in four planes (GRGB or something). Ignore this too.
	ImageStage3      ImageKind = C.ImageStage3      // dng_validate stage 3: demosaiced RGB data
	ImageFinalRender ImageKind = C.ImageFinalRender // DNG developed to final (color curve adjustments, etc)
)

type Mat3

type Mat3 [9]float64 // row-at-a-time, so index == (x + y*3)

type URat

type URat [2]uint32

type Vec3

type Vec3 [3]float64

Vec3, Mat3, and URat are simple types to hold values returned from the DNG API

Jump to

Keyboard shortcuts

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