This commit is contained in:
nxshock 2021-03-23 23:36:27 +05:00
parent bfd43a5531
commit e3053bd087

View file

@ -20,7 +20,7 @@ func ExampleCrop() {
croppedImage := colorcrop.Crop( croppedImage := colorcrop.Crop(
sourceImage, // for source image sourceImage, // for source image
color.RGBA{255, 255, 255, 255}, // crop white border color.RGBA{255, 255, 255, 255}, // crop white border
0.5) // with 50% thresold 0.5) // with 50% thresold
// Save cropped image // Save cropped image
croppedFile, _ := os.Create("cropped.png") croppedFile, _ := os.Create("cropped.png")
@ -41,8 +41,8 @@ func ExampleCropWithComparator() {
croppedImage := colorcrop.CropWithComparator( croppedImage := colorcrop.CropWithComparator(
sourceImage, // for source image sourceImage, // for source image
color.RGBA{255, 255, 255, 255}, // crop white border color.RGBA{255, 255, 255, 255}, // crop white border
0.5, // with 50% thresold 0.5, // with 50% thresold
colorcrop.CmpCIE76) // using CIE76 standart for defining color difference colorcrop.CmpCIE76) // using CIE76 standart for defining color difference
// Save cropped image // Save cropped image
croppedFile, _ := os.Create("cropped.png") croppedFile, _ := os.Create("cropped.png")