• Stars
    star
    39
  • Rank 693,563 (Top 14 %)
  • Language
    Go
  • License
    BSD 3-Clause "New...
  • Created over 6 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The imghdr module determines the type of image contained in a file for go

Build Status GoDoc Go Report Card Coverage Status

goimghdr

Inspired by Python's imghdr

Installation

go get github.com/corona10/goimghdr

List of return value

Value Image format
"rgb" SGI ImgLib Files
"gif" GIF 87a and 89a Files
"pbm" Portable Bitmap Files
"pgm" Portable Graymap Files
"ppm" Portable Pixmap Files
"tiff" TIFF Files
"rast" Sun Raster Files
"xbm" X Bitmap Files
"jpeg" JPEG data in JFIF or Exif formats
"bmp" BMP files
"png" Portable Network Graphics
"webp" WebP files
"exr" OpenEXR Files

Usage

example

asciicast

Special thanks to

Reference