thumb

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package thumb generates JPEG thumbnails for images and videos.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePNG

func DecodePNG(data []byte) (image.Image, error)

DecodePNG is exported for tests; it decodes PNG bytes to an image.

func FromImage

func FromImage(data []byte) ([]byte, error)

FromImage decodes image data and returns a JPEG thumbnail. Supported input formats include any format registered with image.Decode (typically JPEG, PNG, GIF, WebP when imported).

func Placeholder

func Placeholder() []byte

Placeholder returns a minimal valid 1x1 JPEG for formats we cannot decode.

Types

This section is empty.

Jump to

Keyboard shortcuts

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