D
D
Darlov2016-02-21 16:22:50
go
Darlov, 2016-02-21 16:22:50

Is there a package for Golang to remove the background of an image i.e. make it transparent?

Can you tell me a package for Golang to remove the background of an image, i.e. make it transparent? The background is monochromatic.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valery Kostikov, 2016-10-01
@discip1e

Image processing package bild .
You can make the fill the desired color fill

import (
    "image"
    "image/color"

    "github.com/anthonynsimon/bild/paint"
)

...

result := paint.FloodFill(img, image.Point{240, 0}, color.RGBA{0, 0, 0, 0}, 15)

...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question