KaraAmbarKart

package module
v0.0.0-...-bc875f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

README

KaraAmbarKart

Go, gg kütüphanesi ile eğlence amaçlı hazırlanmış otomatik kart dolduran eleman.


import (
   "github.com/raifpy/KaraAmbarKart"
)

func _() {
   kart, _ := KaraAmbarKart.YeniKart()

   h, _ := os.Open("image.png")
   defer h.Close()

   res, _ := kart.AycicekYagi("Rivcep", "Vedik", "000045", h)

   f, _ := os.Create("out.png")
   KaraAmbarKart.Buf(res).WriteTo(f)
   f.Close()

}
import requests
res = requests.get("https://api.codeksion.net/fun/karaambar",files={"photo":open("homer.png","rb")},data={"name":"Homer","surname":"İvedik"})
...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Buf

func Buf(i image.Image) *bytes.Buffer

func ResizeImage

func ResizeImage(im image.Image) image.Image

Types

type FontSecenek

type FontSecenek truetype.Options

type Kart

type Kart struct {
	Font *truetype.Font
	Kart image.Image
	// contains filtered or unexported fields
}

func YeniKart

func YeniKart(secenekler ...Secenekler) (kart_ *Kart, err error)

func (*Kart) AycicekYagi

func (k *Kart) AycicekYagi(isim, soyisim, uyeno string, photo io.Reader) (image.Image, error)

func (*Kart) TereYagi

func (k *Kart) TereYagi(isim, soyisim, uyeno string, photo []byte) (image.Image, error)

func (*Kart) ZeytinYagi

func (k *Kart) ZeytinYagi(isim, soyisim, uyeno string, photo image.Image) image.Image

type Secenekler

type Secenekler struct {
	Renk color.Color
	Font []byte

	FontAyarlari *FontSecenek

	IsimX float64
	IsimY float64

	SoyIsimX float64
	SoyIsimY float64

	UyeNoX float64
	UyeNoY float64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL