Documentation ¶
Index ¶
- Constants
- func IsSupportedColorDepth(depth uint) error
- type Book
- type BookConfig
- type GrayscaleConfig
- type Orientation
- type Page
- func (left *Page) Connect(right *Page) (*Page, error)
- func (p *Page) ConvertToGrayscale(cfg GrayscaleConfig) error
- func (p *Page) Destroy()
- func (p Page) Filename(suffix string) string
- func (p Page) Filepath(dir string, suffix string) string
- func (left *Page) IsDoublePageSpread(right *Page, cfg SpreadConfig) (bool, error)
- func (p *Page) LeftRight(other *Page) (left *Page, right *Page)
- func (p Page) Rect() Rect
- func (p *Page) ResizeToFit(screen Size) error
- func (p Page) Size() Size
- func (p *Page) Trim(cfg TrimConfig, fuzzP float64) error
- func (p Page) WriteFile(dir string) (string, string, error)
- type PageExtractor
- type PageRange
- func (pr *PageRange) Add(start int, end int)
- func (pr PageRange) All() []int
- func (pr PageRange) Contains(page int) bool
- func (pr PageRange) First() int
- func (pr PageRange) Last() int
- func (pr PageRange) PageCount() int
- func (pr *PageRange) Parse(str string, total int) error
- func (pr PageRange) String() string
- type Point
- type Rect
- func (r Rect) BoundBy(frame Rect) Rect
- func (r Rect) InsetBy(dx int, dy int) Rect
- func (r Rect) LeftEdge(width uint, margin uint) Rect
- func (r Rect) MaxX() int
- func (r Rect) MaxY() int
- func (r Rect) MinX() int
- func (r Rect) MinY() int
- func (r Rect) MoveInside(frame Rect) Rect
- func (r Rect) RightEdge(width uint, margin uint) Rect
- func (r Rect) String() string
- func (r Rect) ToRectangle() image.Rectangle
- func (r Rect) TranslateBy(dx int, dy int) Rect
- type Size
- type SpreadConfig
- type TrimConfig
Constants ¶
View Source
const ( Portrait = iota Landscape Square )
Variables ¶
This section is empty.
Functions ¶
func IsSupportedColorDepth ¶ added in v0.2.0
Types ¶
type Book ¶
type Book struct { Filepath string Title string PageCount int Config BookConfig // contains filtered or unexported fields }
type GrayscaleConfig ¶ added in v0.2.0
type Orientation ¶
type Orientation int
func (Orientation) String ¶
func (o Orientation) String() string
type Page ¶
type Page struct { PageNo int OtherPageNo int // the other page number that this page connected with // contains filtered or unexported fields }
func (*Page) ConvertToGrayscale ¶
func (p *Page) ConvertToGrayscale(cfg GrayscaleConfig) error
func (*Page) IsDoublePageSpread ¶
func (left *Page) IsDoublePageSpread(right *Page, cfg SpreadConfig) (bool, error)
func (*Page) ResizeToFit ¶
type PageExtractor ¶ added in v0.3.0
type PageExtractor interface { Name() string Detect() error Extract(inputFile string, page int, dpi float64, outputFile string) error }
func FindExtractor ¶ added in v0.3.0
func FindExtractor() (PageExtractor, error)
type PageRange ¶
type PageRange struct {
// contains filtered or unexported fields
}
func NewPageRange ¶
func NewPageRange() *PageRange
type Rect ¶
type Rect struct {
// contains filtered or unexported fields
}
TODO: Use image.Rectange
func FromRectangle ¶ added in v0.3.0
func (Rect) MoveInside ¶
func (Rect) ToRectangle ¶ added in v0.3.0
type Size ¶
func SizeFromBounds ¶ added in v0.3.0
func (Size) Orientation ¶
func (s Size) Orientation() Orientation
type SpreadConfig ¶
type TrimConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.