epubimage

package
v2.0.0-...-c09f89d Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Image helpers to transform image.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Id                  int
	Part                int
	Raw                 image.Image
	Width               int
	Height              int
	IsCover             bool
	IsBlank             bool
	DoublePage          bool
	Path                string
	Name                string
	Position            string
	Format              string
	OriginalAspectRatio float64
}

func (*Image) EPUBImgPath

func (i *Image) EPUBImgPath() string

image path into the EPUB

func (*Image) EPUBPagePath

func (i *Image) EPUBPagePath() string

page path into the EPUB

func (*Image) EPUBSpacePath

func (i *Image) EPUBSpacePath() string

path of the blank page into the EPUB

func (*Image) ImgKey

func (i *Image) ImgKey() string

key for image

func (*Image) ImgPath

func (i *Image) ImgPath() string

image path

func (*Image) ImgStyle

func (i *Image) ImgStyle(viewWidth, viewHeight int, align string) string

style to apply to the image.

center by default. align to left or right if it's part of the splitted double page.

func (*Image) PageKey

func (i *Image) PageKey() string

key for page

func (*Image) PagePath

func (i *Image) PagePath() string

page path linked to the image

func (*Image) RelSize

func (i *Image) RelSize(viewWidth, viewHeight int) (relWidth, relHeight int)

func (*Image) SpaceKey

func (i *Image) SpaceKey() string

key name of the blank plage after the image

func (*Image) SpacePath

func (i *Image) SpacePath() string

path of the blank page

Jump to

Keyboard shortcuts

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