converter

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Get = getConverter

Get returns a converter by format name. If the converter is not available, an error is returned.

Functions

func Available

func Available() []constant.ConversionFormat

Available returns a list of available converters.

Types

type Converter

type Converter interface {
	// Format returns the output format of this converter.
	Format() constant.ConversionFormat

	// ConvertChapter converts all pages in a chapter from their source files to
	// the target format. Pages are processed in parallel (bounded by CPU count).
	// On success, chapter.Pages is updated with converted PageFile entries.
	// Returns partial success (non-fatal errors) via errors.PageIgnoredError.
	ConvertChapter(ctx context.Context, chapter *manga.Chapter, quality uint8, split bool, progress func(message string, current uint32, total uint32)) (*manga.Chapter, error)

	// PrepareConverter ensures the external encoder binary is available.
	PrepareConverter() error
}

Converter defines the interface for image format converters. All operations are file-to-file: no image data is held in memory in the happy path.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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