dcraw

package
v0.10.7 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT-0 Imports: 19 Imported by: 0

Documentation

Overview

Package dcraw provides support running dcraw.

To use this package you need to point it to a WASM/WASI build of dcraw. My builds of dcraw are available from: https://github.com/ncruces/dcraw

A build of dcraw build can be provided by your application, loaded from a file path or embed into your application.

To embed a build of dcraw into your application, import package embed:

import _ github.com/ncruces/rethinkraw/pkg/dcraw/embed

Index

Constants

This section is empty.

Variables

View Source
var (
	Binary []byte // Binary to execute.
	Path   string // Path to load the binary from.
)

Configure Dcraw.

Functions

func GetOrientation added in v0.10.4

func GetOrientation(ctx context.Context, r io.ReadSeeker) int

GetOrientation returns the EXIF orientation of the RAW file, or 0 if unknown.

func GetRAWPixels

func GetRAWPixels(ctx context.Context, r io.ReadSeeker) ([]byte, error)

GetRAWPixels develops an half-resolution, demosaiced, not white balanced image from the RAW file.

func GetThumb

func GetThumb(ctx context.Context, r io.ReadSeeker) ([]byte, error)

GetThumb extracts a thumbnail from a RAW file.

The thumbnail will either be a JPEG, or a PNM file in 8-bit P5/P6 format. For more about PNM, see https://en.wikipedia.org/wiki/Netpbm

func GetThumbJPEG added in v0.10.4

func GetThumbJPEG(ctx context.Context, r io.ReadSeeker) ([]byte, error)

GetThumbJPEG extracts a JPEG thumbnail from a RAW file.

This is the same as calling GetThumb, but converts PNM thumbnails to JPEG.

func GetThumbSize

func GetThumbSize(ctx context.Context, r io.ReadSeeker) (int, error)

GetThumbSize returns the size of the thumbnail GetThumb would extract. The size is the bigger of width/height, in pixels.

Types

This section is empty.

Directories

Path Synopsis
Package embed provides support embeding dcraw into your application.
Package embed provides support embeding dcraw into your application.

Jump to

Keyboard shortcuts

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