Documentation ¶
Overview ¶
Package composite implements PSD image compositor.
This package supports only RGBA color mode.
Index ¶
- Constants
- Variables
- type Layer
- type Options
- type Renderer
- type Tree
- func (t *Tree) Clone() *Tree
- func (t *Tree) Thumbnail(seqID int, size int, tempBuffer []byte) (*image.NRGBA, error)
- func (t *Tree) ThumbnailSheet(ctx context.Context, size int) (*image.NRGBA, map[int]image.Rectangle, error)
- func (t *Tree) Thumbnails(ctx context.Context, size int) (map[int]*image.NRGBA, error)
- func (t *Tree) Transform(ctx context.Context, m f64.Aff3, gamma float64) (*Tree, error)
Constants ¶
View Source
const DefaultTileSize = 64
View Source
const SeqIDRoot = -1
Variables ¶
View Source
var ErrAborted = errors.New("composite: aborted")
Functions ¶
This section is empty.
Types ¶
type Layer ¶
type Layer struct { SeqID int Name string Folder bool FolderOpen bool Visible bool BlendMode psd.BlendMode Opacity int // 0-255 Clipping bool BlendClippedElements bool MaskEnabled bool MaskDefaultColor int // 0 or 255 Parent *Layer Children []Layer ClippedBy *Layer Clip []*Layer }
Layer represents the layer image.
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer is a renderer.
func (*Renderer) RenderDiff ¶
RenderDiff renders only the place changed since last time.
func (*Renderer) SetDirtyByLayer ¶
type Tree ¶
type Tree struct { Renderer *Renderer Root Layer Rect image.Rectangle CanvasRect image.Rectangle // contains filtered or unexported fields }
Tree represents the layer tree.
func New ¶
New creates layer tree from the psdFile.
New can cancel processing through ctx. If you pass 0 to opt.TileSize, it will be DefaultTileSize.
func (*Tree) Clone ¶
Clone creates copy of r.
Required memory is not very large because layer images are shared between them.
func (*Tree) ThumbnailSheet ¶
func (*Tree) Thumbnails ¶
Click to show internal directories.
Click to hide internal directories.