rimage

package
v0.0.0-...-2ae72bd Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Resize and reencode image.

Index

Constants

View Source
const (
	NameResizeJpeg = "img-fetch-resize-jpeg"

	ExtensionJpeg = ".jpg"
)

Variables

This section is empty.

Functions

func FetchResizeJpeg

func FetchResizeJpeg(t *tool.Tool, url []byte) ([]byte, error)

Types

type Image

type Image struct {
	// With and height as string because use will use it in attribute.
	Height string
	Width  string

	JPEG []byte `json:"-"`
}

func New

func New(t *tool.Tool, url string) *Image

func (*Image) Render

func (img *Image) Render(base, title string) render.Node

func (*Image) Save

func (img *Image) Save(t *tool.Tool, path string)

Jump to

Keyboard shortcuts

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