Skip to content
Discussion options

You must be logged in to vote

Hmmm, I see, still has artefacts around the edges of the product. I wonder if only blurring the background rgb bands (not the alpha band) will help. Seems to:

iex> original = Image.open!("/Users/kip/Desktop/original_image.png")
iex> product = Image.open!("/Users/kip/Desktop/product.png")
iex> inverted_mask = Image.invert!(product[3])
iex> background = Image.add_alpha!(original, inverted_mask)
iex> blurred_background = Image.blur!(background[0..2]) |> Image.add_alpha!(background[3])
iex> composed = Image.compose!(blurred_background, product)

Replies: 7 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@zachallaun
Comment options

Answer selected by zachallaun
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@zachallaun
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants