prominentcolor icon indicating copy to clipboard operation
prominentcolor copied to clipboard

Mask Problem

Open terzano opened this issue 2 years ago • 0 comments

The following image produce the incorrect result:

Failed, no non-alpha pixels found (either fully transparent image, or the ColorBackgroundMask removed all pixels)

resizeSize := uint(prominentcolor.DefaultSize)
bgmasks := []prominentcolor.ColorBackgroundMask{prominentcolor.MaskWhite}
colours, err := prominentcolor.KmeansWithAll(
		5, img, prominentcolor.ArgumentNoCropping|prominentcolor.ArgumentAverageMean|prominentcolor.ArgumentDebugImage,
		resizeSize, bgmasks)

test

I believe all single color images have the same problem

terzano avatar Mar 29 '22 22:03 terzano