DEV Community

Discussion on: Go: เปลี่ยนสีรูปเป็น Gray scale

Collapse
 
jonrandy profile image
Jon Randy 🎖️
import (
    "image"
    _ "image/jpeg"
    "image/png"
    "log"
    "os"
)
Enter fullscreen mode Exit fullscreen mode

What is the purpose of the named, unused image/jpeg import? Maybe just to make sure some JPEG related stuff is initialised?

Collapse
 
iporsut profile image
Weerasak Chongnguluam

Yes, just import for registering image format for image.Decode function.