Documentation
¶
Index ¶
- func PixelDecode(p Pixel) error
- func PixelDist(p1, p2 Pixel) (float64, error)
- func PixelEncode(p Pixel) error
- type Aspect
- type Cover
- type CoverPartial
- type CoverPartialQuadView
- type Gidx
- func (g *Gidx) GetHeight() int
- func (g *Gidx) GetMd5sum() string
- func (g *Gidx) GetOrientation() int
- func (g *Gidx) GetPath() string
- func (g *Gidx) GetWidth() int
- func (g *Gidx) SetHeight(height int)
- func (g *Gidx) SetMd5sum(md5sum string)
- func (g *Gidx) SetOrientation(orientation int)
- func (g *Gidx) SetPath(path string)
- func (g *Gidx) SetWidth(width int)
- func (gidx *Gidx) Within(threashold float64, aspect *Aspect) bool
- type GidxPartial
- type Image
- type Lab
- type Macro
- func (g *Macro) GetHeight() int
- func (g *Macro) GetMd5sum() string
- func (g *Macro) GetOrientation() int
- func (g *Macro) GetPath() string
- func (g *Macro) GetWidth() int
- func (g *Macro) SetHeight(height int)
- func (g *Macro) SetMd5sum(md5sum string)
- func (g *Macro) SetOrientation(orientation int)
- func (g *Macro) SetPath(path string)
- func (g *Macro) SetWidth(width int)
- type MacroGidxView
- type MacroPartial
- type Mosaic
- type MosaicPartial
- type MosaicPartialView
- type PartialComparison
- type Pixel
- type Project
- type QuadDist
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PixelDecode ¶
PixelDecode decodes []byte of Data to slice of *Lab and stores in Pixels.
func PixelEncode ¶
PixelEncode encodes slice of Pixels to json-encoded []byte and stores in Data.
Types ¶
type Aspect ¶
func (*Aspect) RoundHeight ¶
func (*Aspect) RoundWidth ¶
type CoverPartial ¶
type CoverPartial struct {
Id int64 `db:"id"`
CoverId int64 `db:"cover_id"`
AspectId int64 `db:"aspect_id"`
X1 int `db:"x1"`
Y1 int `db:"y1"`
X2 int `db:"x2"`
Y2 int `db:"y2"`
}
func (*CoverPartial) Area ¶
func (cp *CoverPartial) Area() int
func (*CoverPartial) Height ¶
func (cp *CoverPartial) Height() int
func (*CoverPartial) Pt ¶
func (cp *CoverPartial) Pt() image.Point
func (*CoverPartial) Rectangle ¶
func (cp *CoverPartial) Rectangle() image.Rectangle
func (*CoverPartial) Width ¶
func (cp *CoverPartial) Width() int
type CoverPartialQuadView ¶
type CoverPartialQuadView struct {
CoverPartial *CoverPartial
QuadDist *QuadDist
}
type Gidx ¶
type Gidx struct {
Id int64 `db:"id"`
AspectId int64 `db:"aspect_id"`
Path string `db:"path"`
Md5sum string `db:"md5sum"`
Width int `db:"width"`
Height int `db:"height"`
Orientation int `db:"orientation"`
}
func (*Gidx) GetOrientation ¶
func (*Gidx) SetOrientation ¶
type GidxPartial ¶
type GidxPartial struct {
Id int64 `db:"id"`
GidxId int64 `db:"gidx_id"`
AspectId int64 `db:"aspect_id"`
Data []byte `db:"data"`
Pixels []*Lab `db:"-"`
}
func (*GidxPartial) DecodeData ¶
func (p *GidxPartial) DecodeData() error
func (*GidxPartial) EncodePixels ¶
func (p *GidxPartial) EncodePixels() error
func (*GidxPartial) GetData ¶
func (p *GidxPartial) GetData() []byte
func (*GidxPartial) GetPixels ¶
func (p *GidxPartial) GetPixels() []*Lab
func (*GidxPartial) SetData ¶
func (p *GidxPartial) SetData(data []byte)
func (*GidxPartial) SetPixels ¶
func (p *GidxPartial) SetPixels(pixels []*Lab)
type Lab ¶
type Macro ¶
type Macro struct {
Id int64 `db:"id"`
AspectId int64 `db:"aspect_id"`
CoverId int64 `db:"cover_id"`
Path string `db:"path"`
Md5sum string `db:"md5sum"`
Width int `db:"width"`
Height int `db:"height"`
Orientation int `db:"orientation"`
}
func (*Macro) GetOrientation ¶
func (*Macro) SetOrientation ¶
type MacroGidxView ¶
type MacroGidxView struct {
MacroPartial *MacroPartial
GidxPartial *GidxPartial
}
func (*MacroGidxView) PartialComparison ¶
func (macroGidxView *MacroGidxView) PartialComparison() (*PartialComparison, error)
type MacroPartial ¶
type MacroPartial struct {
Id int64 `db:"id"`
MacroId int64 `db:"macro_id"`
CoverPartialId int64 `db:"cover_partial_id"`
AspectId int64 `db:"aspect_id"`
Data []byte `db:"data"`
Pixels []*Lab `db:"-"`
}
func (*MacroPartial) DecodeData ¶
func (p *MacroPartial) DecodeData() error
func (*MacroPartial) EncodePixels ¶
func (p *MacroPartial) EncodePixels() error
func (*MacroPartial) GetData ¶
func (p *MacroPartial) GetData() []byte
func (*MacroPartial) GetPixels ¶
func (p *MacroPartial) GetPixels() []*Lab
func (*MacroPartial) SetData ¶
func (p *MacroPartial) SetData(data []byte)
func (*MacroPartial) SetPixels ¶
func (p *MacroPartial) SetPixels(pixels []*Lab)
type MosaicPartial ¶
type MosaicPartialView ¶
type MosaicPartialView struct {
MosaicPartialId int64
Gidx *Gidx
CoverPartial *CoverPartial
}
type PartialComparison ¶
type Project ¶
type Project struct {
Id int64 `db:"id"`
Name string `db:"name"`
Path string `db:"path"`
CoverPath string `db:"cover_path"`
MacroPath string `db:"macro_path"`
MosaicPath string `db:"mosaic_path"`
CoverId int64 `db:"cover_id"`
MacroId int64 `db:"macro_id"`
MosaicId int64 `db:"mosaic_id"`
IsComplete bool `db:"is_complete"`
CreatedAt time.Time `db:"created_at"`
}
Click to show internal directories.
Click to hide internal directories.