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 ¶
- Variables
- func GetOrientation(ctx context.Context, r io.ReadSeeker) int
- func GetRAWPixels(ctx context.Context, r io.ReadSeeker) ([]byte, error)
- func GetThumb(ctx context.Context, r io.ReadSeeker) ([]byte, error)
- func GetThumbJPEG(ctx context.Context, r io.ReadSeeker) ([]byte, error)
- func GetThumbSize(ctx context.Context, r io.ReadSeeker) (int, error)
Constants ¶
This section is empty.
Variables ¶
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 ¶
GetRAWPixels develops an half-resolution, demosaiced, not white balanced image from the RAW file.
func GetThumb ¶
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
GetThumbJPEG extracts a JPEG thumbnail from a RAW file.
This is the same as calling GetThumb, but converts PNM thumbnails to JPEG.
func GetThumbSize ¶
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.