github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/mediatypes/media-types-image.go (about)

     1  /* For license and copyright information please see LEGAL file in repository */
     2  
     3  package mediatypes
     4  
     5  import (
     6  	"../mediatype"
     7  	"../protocol"
     8  )
     9  
    10  var (
    11  	GIF mediatype.MediaType
    12  
    13  	JPG  mediatype.MediaType
    14  	JPEG mediatype.MediaType
    15  
    16  	PNG mediatype.MediaType
    17  
    18  	SVG mediatype.MediaType
    19  
    20  	ICO mediatype.MediaType
    21  
    22  	WEBP mediatype.MediaType
    23  
    24  	TIF  mediatype.MediaType
    25  	TIFF mediatype.MediaType
    26  )
    27  
    28  func init() {
    29  	GIF.Init("image/gif")
    30  	GIF.SetFileExtension("gif")
    31  	GIF.SetDetail(protocol.LanguageEnglish, "Graphics Interchange Format", "", "", "", "", []string{})
    32  
    33  	JPG.Init("image/jpeg")
    34  	JPG.SetFileExtension("jpg")
    35  	JPG.SetDetail(protocol.LanguageEnglish, "JPEG images", "", "", "", "", []string{})
    36  
    37  	JPEG.Init("image/jpeg")
    38  	JPEG.SetFileExtension("jpeg")
    39  	JPEG.SetDetail(protocol.LanguageEnglish, "JPEG images", "", "", "", "", []string{})
    40  
    41  	PNG.Init("image/png")
    42  	PNG.SetFileExtension("png")
    43  	PNG.SetDetail(protocol.LanguageEnglish, "Portable Network Graphics", "", "", "", "", []string{})
    44  
    45  	SVG.Init("image/svg+xml")
    46  	SVG.SetFileExtension("svg")
    47  	SVG.SetDetail(protocol.LanguageEnglish, " Scalable Vector Graphics", "", "", "", "", []string{})
    48  
    49  	ICO.Init("image/x-icon")
    50  	ICO.SetFileExtension("ico")
    51  	ICO.SetDetail(protocol.LanguageEnglish, "Icon format", "", "", "", "", []string{})
    52  
    53  	WEBP.Init("image/webp")
    54  	WEBP.SetFileExtension("webp")
    55  	WEBP.SetDetail(protocol.LanguageEnglish, "WEBP image", "", "", "", "", []string{})
    56  
    57  	TIF.Init("image/tiff")
    58  	TIF.SetFileExtension("tif")
    59  	TIF.SetDetail(protocol.LanguageEnglish, "Tagged Image File Format", "", "", "", "", []string{})
    60  
    61  	TIFF.Init("image/tiff")
    62  	TIFF.SetFileExtension("tiff")
    63  	TIFF.SetDetail(protocol.LanguageEnglish, "Tagged Image File Format", "", "", "", "", []string{})
    64  }