示例#1
1
func init() {
	image.RegisterFormat("imagefile", imagefileHeader, Decode, DecodeConfig)
}
示例#2
0
func init() {
	// damn important or else At(), Bounds() functions will
	// caused memory pointer error!!
	image.RegisterFormat("jpeg", "jpeg", jpeg.Decode, jpeg.DecodeConfig)
	image.RegisterFormat("gif", "gif", gif.Decode, gif.DecodeConfig)
	image.RegisterFormat("png", "png", png.Decode, png.DecodeConfig)
}
func init() {

	image.RegisterFormat("png", "png", png.Decode, png.DecodeConfig)

	image.RegisterFormat("jpeg", "jpeg", jpeg.Decode, jpeg.DecodeConfig)

	image.RegisterFormat("gif", "gif", gif.Decode, gif.DecodeConfig)
}
示例#4
0
func init() {
	image.RegisterFormat("jpeg", "\xff\xd8", jpeg.Decode, jpeg.DecodeConfig)
	image.RegisterFormat("png", "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A", png.Decode, png.DecodeConfig)
	image.RegisterFormat("gif", "\x47\x49\x46\x38\x39\x61", gif.Decode, gif.DecodeConfig)
	image.RegisterFormat("bmp", "\x42\x4D", bmp.Decode, bmp.DecodeConfig)

	conf.ACCESS_KEY = "Zuc-jpgrzuAmFY46MOjhKkwEClS0dHZm25IPVek3"
	conf.SECRET_KEY = "a_Xw1Xz0cdO1I694JoXT9QKX6XFTRoRlkqhoZvNF"
}
示例#5
0
文件: imagex.go 项目: palaiyacw/imgry
func init() {
	// Manually register the ICO format as it has no magic string and 0010 is a
	// terrible thing to sniff for. This init is run after the imports' inits in
	// this package. So GIF, JPEG, PNG, BMP will be init and registered first.
	// This means always leave the _ imports for images above.
	image.RegisterFormat("ico", "\x00\x00\x01\x00", ico.Decode, ico.DecodeConfig)
}
示例#6
0
文件: imgavg.go 项目: donatj/imgavg
func init() {
	flag.Usage = func() {
		fmt.Fprintf(os.Stderr, "Usage of %s [dir] [outputfile]:\n", os.Args[0])
		flag.PrintDefaults()
	}

	flag.Parse()

	if len(flag.Args()) < 1 {
		flag.Usage()
		os.Exit(2)
	}

	image.RegisterFormat("png", "png", png.Decode, png.DecodeConfig)
	image.RegisterFormat("jpeg", "jpeg", jpeg.Decode, jpeg.DecodeConfig)
	image.RegisterFormat("gif", "gif", gif.Decode, gif.DecodeConfig)
}
示例#7
0
文件: jigsaw.go 项目: DavidP15/jigsaw
//initializes the main image, creates the on and off colors
func (jigsaw *Jigsaw) Init(imageRootDirectory string) bool {
	jigsaw.ImageRootDirectory = imageRootDirectory
	os.Mkdir(imageRootDirectory+string(filepath.Separator)+PIECE_DIRECTORY, 0777)
	image.RegisterFormat("png", "png", png.Decode, png.DecodeConfig)
	fullImage, err := createImage(jigsaw.ImageRootDirectory + "/" + jigsaw.FullImageLocation)
	jigsaw.OffColor = color.RGBA{uint8(jigsaw.TemplateOff >> 24), uint8(jigsaw.TemplateOff >> 16), uint8(jigsaw.TemplateOff >> 8), uint8(jigsaw.TemplateOff & 0x000000FF)}
	jigsaw.OnColor = color.RGBA{uint8(jigsaw.TemplateOn >> 24), uint8(jigsaw.TemplateOn >> 16), uint8(jigsaw.TemplateOn >> 8), uint8(jigsaw.TemplateOn & 0x000000FF)}
	if err == nil {
		jigsaw.FullImage = fullImage
		return true
	}
	return false
}
示例#8
0
func init() {
	image.RegisterFormat("tiff", tiff.MagicBigEndian, Decode, DecodeConfig)
	image.RegisterFormat("tiff", tiff.MagicLitEndian, Decode, DecodeConfig)
	image.RegisterFormat("bigtiff", bigtiff.MagicBigEndian, Decode, DecodeConfig)
	image.RegisterFormat("bigtiff", bigtiff.MagicLitEndian, Decode, DecodeConfig)
	image.RegisterFormat("tiff85", tiff85.MagicBigEndian, Decode, DecodeConfig)
	image.RegisterFormat("tiff85", tiff85.MagicLitEndian, Decode, DecodeConfig)
}
示例#9
0
func init() {
	image.RegisterFormat("pbm ascii (black/white)", "P1", Decode, DecodeConfig)
	image.RegisterFormat("pgm ascii (grayscale)", "P2", Decode, DecodeConfig)
	image.RegisterFormat("ppm ascii (rgb)", "P3", Decode, DecodeConfig)
	image.RegisterFormat("pbm raw (black/white)", "P4", Decode, DecodeConfig)
	image.RegisterFormat("pgm raw (grayscale)", "P5", Decode, DecodeConfig)
	image.RegisterFormat("ppm raw (rgb)", "P6", Decode, DecodeConfig)
	//image.RegisterFormat("pam", "P7", Decode, DecodeConfig)
}
示例#10
0
文件: reader.go 项目: jcmdev0/go
func init() {
	image.RegisterFormat("pbm plain", "P1", Decode, DecodeConfig)
	image.RegisterFormat("pgm plain", "P2", Decode, DecodeConfig)
	image.RegisterFormat("ppm plain", "P3", Decode, DecodeConfig)
	image.RegisterFormat("pbm raw", "P4", Decode, DecodeConfig)
	image.RegisterFormat("pgm raw", "P5", Decode, DecodeConfig)
	image.RegisterFormat("ppm raw", "P6", Decode, DecodeConfig)
	//image.RegisterFormat("pam", "P7", Decode, DecodeConfig)
}
示例#11
0
func init() {
	image.RegisterFormat("cr2", leHeader, Decode, DecodeConfig)
}
示例#12
0
func init() {
	image.RegisterFormat("tiff", leHeader, Decode, DecodeConfig)
	image.RegisterFormat("tiff", beHeader, Decode, DecodeConfig)
}
示例#13
0
文件: reader.go 项目: spate/glimage
func init() {
	image.RegisterFormat("dds", "DDS ", Decode, DecodeConfig)
}
示例#14
0
func init() {
	image.RegisterFormat("ico", icoHeader, decodeImage, DecodeConfig)
}
示例#15
0
func init() {
	image.RegisterFormat("bmp", "BM????\x00\x00\x00\x00", Decode, DecodeConfig)
}
示例#16
0
文件: main.go 项目: vamsi/playground
func init() {
	image.RegisterFormat("jpeg", "jpeg", jpeg.Decode, jpeg.DecodeConfig)
}
示例#17
0
文件: decode.go 项目: jayschwa/groke
func init() {
	image.RegisterFormat("pcx", "\x0a\x05", Decode, DecodeConfig)
}
示例#18
0
func init() {
	image.RegisterFormat("gif", "GIF8?a", Decode, DecodeConfig)
}
示例#19
0
文件: reader.go 项目: hyhhui/bpg
func init() {
	image.RegisterFormat("bpg", headerMagic, Decode, DecodeConfig)
}
示例#20
0
func init() {
	image.RegisterFormat("webp", "RIFF????WEBPVP8", Decode, DecodeConfig)
}
示例#21
0
文件: reader.go 项目: knieriem/g
func init() {
	image.RegisterFormat("xbm", "/*", Decode, DecodeConfig)
	image.RegisterFormat("xbm", "#defi", Decode, DecodeConfig)
}
示例#22
0
func init() {
	image.RegisterFormat("mac", "\x00????????????????????????????????????????????????????????????????PNTG", Decode, DecodeConfig)
}
示例#23
0
文件: pgm.go 项目: tburke/netpbm
// Indicate that we can decode both raw and plain PGM files.
func init() {
	image.RegisterFormat("pgm", "P5", decodePGM, decodeConfigPGM)
	image.RegisterFormat("pgm", "P2", decodePGMPlain, decodeConfigPGM)
}
示例#24
0
文件: pbm.go 项目: knieriem/g
func init() {
	image.RegisterFormat("pbm", "P4", Decode, DecodeConfig)
}
示例#25
0
func init() {
	image.RegisterFormat("jpeg", "\xff\xd8", Decode, DecodeConfig)
}
示例#26
0
文件: pbm.go 项目: tburke/netpbm
// Indicate that we can decode both raw and plain PBM files.
func init() {
	image.RegisterFormat("pbm", "P4", decodePBM, decodeConfigPBM)
	image.RegisterFormat("pbm", "P1", decodePBMPlain, decodeConfigPBM)
}
示例#27
0
文件: ppm.go 项目: tburke/netpbm
// Indicate that we can decode both raw and plain PPM files.
func init() {
	image.RegisterFormat("ppm", "P6", decodePPM, decodeConfigPPM)
	image.RegisterFormat("ppm", "P3", decodePPMPlain, decodeConfigPPM)
}
示例#28
0
文件: decode.go 项目: blezek/tga
func RegisterFormat() {
	image.RegisterFormat("tga", "", Decode, DecodeConfig)
}
示例#29
0
文件: reader.go 项目: nitinalabur/gcc
func init() {
	image.RegisterFormat("png", pngHeader, Decode, DecodeConfig)
}
示例#30
0
文件: lmp.go 项目: jayschwa/groke
func init() {
	Palette = DefaultPalette
	image.RegisterFormat("lmp", "", Decode, DecodeConfig)
}