stripper

package
v0.0.0-...-53e698e Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package stripper removes metadata at the binary/container level, before any image decode step. This ensures that C2PA, EXIF, XMP, IPTC, ICC profiles, and any other embedded blobs are eliminated even when they would survive a normal decode/re-encode cycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RebuildPNGCRC

func RebuildPNGCRC(chunkType string, data []byte) uint32

RebuildPNGCRC computes the CRC32 for a PNG chunk (type + data). Exported for use in tests.

func StripJPEGSegments

func StripJPEGSegments(data []byte, verbose bool) ([]byte, error)

StripJPEGSegments walks the JPEG segment list and removes every APP segment that carries metadata, keeping only image-essential markers (SOF, DHT, DQT, SOS, and the raw entropy-coded scan data).

func StripPNGChunks

func StripPNGChunks(data []byte, verbose bool) ([]byte, error)

StripPNGChunks parses the PNG chunk stream and rebuilds it, keeping only image-essential chunks. All metadata, color hint, and fingerprint chunks are discarded.

func StripWEBPChunks

func StripWEBPChunks(data []byte, verbose bool) ([]byte, error)

StripWEBPChunks removes metadata RIFF chunks from a WEBP file and reconstructs a valid RIFF/WEBP container with the remaining chunks.

Types

This section is empty.

Jump to

Keyboard shortcuts

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