Categorygithub.com/neurosnap/go-jpeg-image-structure
modulepackage
0.0.0-20221010133817-70b1c1ff679e
Repository: https://github.com/neurosnap/go-jpeg-image-structure.git
Documentation: pkg.go.dev

# README

Build Status codecov Go Report Card GoDoc

Overview

Parse raw JPEG data into individual segments of data. You can print or export this data, including hash digests for each. You can also parse/modify the EXIF data and write an updated image.

EXIF, XMP, and IPTC data can also be extracted. The provided CLI tool can print this data as well.

# Packages

No description provided by the author

# Functions

DumpBytes prints the hex for a given byte-slice.
DumpBytesClause prints a Go-formatted byte-slice expression.
DumpBytesClauseToString returns a string of Go-formatted byte values.
DumpBytesToString returns a string of hex-encoded bytes.
FormatXml prettifies XML data.
GetModuleRootPath returns the root-path of the module.
GetTestAssetsPath returns the path of the test-assets.
GetTestImageFilepath returns the file-path of the common test-image.
GetTestImageFujiFilepath returns the file-path of the fuji camera test image.
NewJpegMediaParser returns a new JpegMediaParser.
NewJpegSplitter returns a new JpegSplitter.
NewSegmentList returns a new SegmentList struct.
SortStringStringMap sorts a string-string dictionary and returns it as a list of 2-tuples.

# Constants

MARKER_APP0 marker.
MARKER_APP1 marker.
MARKER_APP10 marker.
MARKER_APP12 marker.
MARKER_APP13 marker.
MARKER_APP14 marker.
MARKER_APP15 marker.
MARKER_APP2 marker.
MARKER_APP3 marker.
MARKER_APP4 marker.
MARKER_APP5 marker.
MARKER_APP6 marker.
MARKER_APP7 marker.
MARKER_APP8 marker.
MARKER_CME marker.
MARKER_COM marker.
MARKER_DAC marker.
MARKER_DHT marker.
MARKER_DQT marker.
MARKER_EOI marker.
MARKER_JPG marker.
MARKER_SIZ marker.
MARKER_SOD marker.
MARKER_SOF0 marker.
MARKER_SOF1 marker.
MARKER_SOF10 marker.
MARKER_SOF11 marker.
MARKER_SOF13 marker.
MARKER_SOF14 marker.
MARKER_SOF15 marker.
MARKER_SOF2 marker.
MARKER_SOF3 marker.
MARKER_SOF5 marker.
MARKER_SOF6 marker.
MARKER_SOF7 marker.
MARKER_SOF9 marker.
MARKER_SOI marker.
MARKER_SOS marker.

# Variables

ErrNoIptc is returned if IPTC data was requested but not found.
ErrNoPhotoshopData is returned if Photoshop info was requested but not found.
ErrNoXmp is returned if XMP data was requested but not found.

# Structs

JpegMediaParser is a `riimage.MediaParser` that knows how to parse JPEG images.
JpegSplitter uses the Go stream splitter to divide the JPEG stream into segments.
Segment describes a single segment.
SegmentList contains a slice of segments.
SofSegment has info read from a SOF segment.

# Interfaces

SegmentVisitor describes a segment-visitor struct.
SofSegmentVisitor describes a visitor that is only called for each SOF segment.