disintegration / imaging

Imaging is a simple image processing package for Go
MIT License
5.3k stars 443 forks source link

How to get image width from imaging #147

Open plftzk opened 3 years ago

plftzk commented 3 years ago

How to get image width from imaging

bk-oak commented 3 years ago
    img, err := imaging.Open(filepath.Join(origImgPath, fileInfo.Name()), imaging.AutoOrientation(true))
    if err != nil {
        return err
    }

    b := img.Bounds()
    width := b.Max.X
    height := b.Max.Y