Documentation ¶
Overview ¶
Package smartcrop implements a content aware image cropping library based on Jonas Wagner's smartcrop.js https://github.com/jwagner/smartcrop.js
Package smartcrop implements a content aware image cropping library based on Jonas Wagner's smartcrop.js https://github.com/jwagner/smartcrop.js
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
Analyzer interface analyzes its struct and returns the best possible crop with the given width and height returns an error if invalid
func NewAnalyzer ¶
func NewAnalyzer() Analyzer
NewAnalyzer returns a new analyzer with default settings
func NewAnalyzerWithCropSettings ¶
func NewAnalyzerWithCropSettings(cropSettings CropSettings, log Logger) Analyzer
NewAnalyzerWithCropSettings returns a new analyzer with the given settings
type CropSettings ¶
type CropSettings struct { FaceDetection bool FaceDetectionHaarCascadeFilepath string InterpolationType resize.InterpolationFunction DebugMode bool Prescale bool PrescaleValue float64 }
CropSettings contains options to change cropping behaviour
Click to show internal directories.
Click to hide internal directories.