image

package
v0.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package image provides image reading and compression with automatic resizing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image []byte

Image represents a collection of image byte slices.

func New

func New(path string) (Image, error)

New reads the image file from the given path and returns its raw bytes.

func (Image) Compress

func (i Image) Compress(dimension, quality int) (Image, error)

func (Image) Save

func (i Image) Save(path string) error

type Images

type Images []Image

func FromPDF

func FromPDF(path string) (Images, error)

FromPDF extracts each page of a PDF as a JPEG image.

func (Images) Compress

func (is Images) Compress(dimension, quality int) (Images, error)

Jump to

Keyboard shortcuts

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