epub

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PALETTE_15 = color.Palette{
	color.Gray{0x00},
	color.Gray{0x11},
	color.Gray{0x22},
	color.Gray{0x33},
	color.Gray{0x44},
	color.Gray{0x55},
	color.Gray{0x66},
	color.Gray{0x77},
	color.Gray{0x88},
	color.Gray{0x99},
	color.Gray{0xaa},
	color.Gray{0xbb},
	color.Gray{0xcc},
	color.Gray{0xdd},
	color.Gray{0xff},
}
View Source
var PALETTE_16 = color.Palette{
	color.Gray{0x00},
	color.Gray{0x11},
	color.Gray{0x22},
	color.Gray{0x33},
	color.Gray{0x44},
	color.Gray{0x55},
	color.Gray{0x66},
	color.Gray{0x77},
	color.Gray{0x88},
	color.Gray{0x99},
	color.Gray{0xaa},
	color.Gray{0xbb},
	color.Gray{0xcc},
	color.Gray{0xdd},
	color.Gray{0xee},
	color.Gray{0xff},
}
View Source
var PALETTE_4 = color.Palette{
	color.Gray{0x00},
	color.Gray{0x55},
	color.Gray{0xaa},
	color.Gray{0xff},
}

Functions

func NewBar

func NewBar(max int, description string, currentJob, totalJob int) *progressbar.ProgressBar

func NewEpub

func NewEpub(options *EpubOptions) *ePub

func NewGift added in v1.0.6

func NewGift(options *ImageOptions) *gift.GIFT

func NewGiftSplitDoublePage added in v1.0.8

func NewGiftSplitDoublePage(options *ImageOptions) []*gift.GIFT

Types

type EpubOptions

type EpubOptions struct {
	Input   string
	Output  string
	Title   string
	Author  string
	LimitMb int

	*ImageOptions
}

type Image

type Image struct {
	Id        int
	Part      int
	Data      *ImageData
	Width     int
	Height    int
	IsCover   bool
	NeedSpace bool
}

func LoadImages

func LoadImages(path string, options *ImageOptions) ([]*Image, error)

type ImageData

type ImageData struct {
	Header *zip.FileHeader
	Data   []byte
}

func (*ImageData) CompressedSize

func (img *ImageData) CompressedSize() uint64

type ImageOptions

type ImageOptions struct {
	Crop                bool
	ViewWidth           int
	ViewHeight          int
	Quality             int
	Algo                string
	Palette             color.Palette
	Brightness          int
	Contrast            int
	AutoRotate          bool
	AutoSplitDoublePage bool
	NoBlankPage         bool
	Manga               bool
	HasCover            bool
	AddPanelView        bool
	Workers             int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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