Registry / utility / muesli-smartcrop

muesli-smartcrop

JSON →
library0.3.0gogounverified

A content aware image cropping library based on Jonas Wagner's smartcrop.js.

go get github.com/muesli/smartcrop
INSTALL
IMPORT
SIG · MUESLI-SMARTCROP
M
muesli-smartcrop
utilitygov0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

smartcrop
github.com/muesli/smartcrop

Finds the best crop for an image.

package main import ( "fmt" "github.com/muesli/smartcrop" "image/jpeg" "os" ) func main() { f, _ := os.Open("input.jpg") defer f.Close() img, _ := jpeg.Decode(f) analyzer := smartcrop.NewAnalyzer() topCrop, _ := analyzer.FindBestCrop(img, 200, 200) fmt.Printf("Best crop: %+v\n", topCrop) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.3.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
muesli-smartcrop — go get muesli-smartcrop · libregistry