Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SimpleMerge ¶
SimpleMerge
param: name Full path of merged image name 合并后图像名称 全路径
param: imgs image.Image Slice Or Array image.Image 切片或数组
param: r image.Rectangle Uniform zoom Rectangle
param: p mage.Point Uniform zoom Point
Example ¶
package main import ( "fmt" "github.com/guolei19850528/go_x_pkgs/x_image/x_coder" "github.com/guolei19850528/go_x_pkgs/x_image/x_merge" "image" "path" ) func main() { imgPath1 := "image path" imgPath2 := "image path" imgPath3 := "image path" imgPath4 := "image path" img1, _ := x_coder.GetImgByName(imgPath1) img2, _ := x_coder.GetImgByName(imgPath2) img3, _ := x_coder.GetImgByName(imgPath3) img4, _ := x_coder.GetImgByName(imgPath4) imgs := make([]image.Image, 0, 0) imgs = append(imgs, img1) imgs = append(imgs, img2) imgs = append(imgs, img3) imgs = append(imgs, img4) //x_slice.ReverseNoSort(imgs) err := x_merge.SimpleMerge(path.Join("your output path", "1.png"), imgs, image.Rect(0, 0, 2200, 2200), image.Pt(0, 0)) if err == nil { fmt.Println("successful") } }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.