Exemple #1
1
func init() {
	image.RegisterFormat("imagefile", imagefileHeader, Decode, DecodeConfig)
}
Exemple #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)
}
Exemple #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"
}
Exemple #5
0
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)
}
Exemple #6
0
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)
}
Exemple #7
0
//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
}
Exemple #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)
}
Exemple #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)
}
Exemple #10
0
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)
}
Exemple #11
0
func init() {
	image.RegisterFormat("cr2", leHeader, Decode, DecodeConfig)
}
Exemple #12
0
func init() {
	image.RegisterFormat("tiff", leHeader, Decode, DecodeConfig)
	image.RegisterFormat("tiff", beHeader, Decode, DecodeConfig)
}
Exemple #13
0
func init() {
	image.RegisterFormat("dds", "DDS ", Decode, DecodeConfig)
}
Exemple #14
0
func init() {
	image.RegisterFormat("ico", icoHeader, decodeImage, DecodeConfig)
}
Exemple #15
0
func init() {
	image.RegisterFormat("bmp", "BM????\x00\x00\x00\x00", Decode, DecodeConfig)
}
Exemple #16
0
func init() {
	image.RegisterFormat("jpeg", "jpeg", jpeg.Decode, jpeg.DecodeConfig)
}
Exemple #17
0
func init() {
	image.RegisterFormat("pcx", "\x0a\x05", Decode, DecodeConfig)
}
Exemple #18
0
func init() {
	image.RegisterFormat("gif", "GIF8?a", Decode, DecodeConfig)
}
Exemple #19
0
func init() {
	image.RegisterFormat("bpg", headerMagic, Decode, DecodeConfig)
}
Exemple #20
0
func init() {
	image.RegisterFormat("webp", "RIFF????WEBPVP8", Decode, DecodeConfig)
}
Exemple #21
0
func init() {
	image.RegisterFormat("xbm", "/*", Decode, DecodeConfig)
	image.RegisterFormat("xbm", "#defi", Decode, DecodeConfig)
}
Exemple #22
0
func init() {
	image.RegisterFormat("mac", "\x00????????????????????????????????????????????????????????????????PNTG", Decode, DecodeConfig)
}
Exemple #23
0
// 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)
}
Exemple #24
0
func init() {
	image.RegisterFormat("pbm", "P4", Decode, DecodeConfig)
}
Exemple #25
0
func init() {
	image.RegisterFormat("jpeg", "\xff\xd8", Decode, DecodeConfig)
}
Exemple #26
0
// 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)
}
Exemple #27
0
// 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)
}
Exemple #28
0
func RegisterFormat() {
	image.RegisterFormat("tga", "", Decode, DecodeConfig)
}
Exemple #29
0
func init() {
	image.RegisterFormat("png", pngHeader, Decode, DecodeConfig)
}
Exemple #30
0
func init() {
	Palette = DefaultPalette
	image.RegisterFormat("lmp", "", Decode, DecodeConfig)
}