disintegration / imaging

Imaging is a simple image processing package for Go
MIT License
5.22k stars 433 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