From b6ca62e80bcf10fa95590c0e74926f625ea18904 Mon Sep 17 00:00:00 2001 From: nxshock Date: Sun, 25 Jun 2017 16:59:36 +0500 Subject: [PATCH] Update readme --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8768424..f0d0d60 100644 --- a/README.md +++ b/README.md @@ -14,16 +14,23 @@ Import package with import "github.com/nxshock/colorcrop" ``` -Crop **white** borders with **50%** of thresold: +Crop white borders with 50% of thresold: ```go -croppedImage := colorcrop.Crop(sourceImage, color.RGBA{255, 255, 255, 255}, 0.5) +croppedImage := colorcrop.Crop( + sourceImage, // for source image + color.RGBA{255, 255, 255, 255}, // crop white border + 0.5) // with 50% thresold ``` You may use custom comparator of colors: ```go -croppedImage := colorcrop.CropWithComparator(sourceImage, color.RGBA{255, 255, 255, 255}, 0.5, colorcrop.CmpCIE76) +croppedImage := colorcrop.CropWithComparator( + sourceImage, // for source image + color.RGBA{255, 255, 255, 255}, // crop white border + 0.5, // with 50% thresold + colorcrop.CmpCIE76) // using CIE76 standart for defining color difference ``` ## Examples