jpeg does not support transparency.
On Tue, Nov 8, 2016 at 12:14 PM, wrote:
> Hi,
>
> I'm trying to write out a png with an alpha component as a jpeg. As I
> understand it, I should be able to use the draw package to do this.
>
> // src is an image.RGBA
> newImg := image.NewRGBA(
On Wed, Nov 9, 2016 at 4:14 AM, wrote:
> I'm trying to write out a png with an alpha component as a jpeg. As I
> understand it, I should be able to use the draw package to do this.
>
> // src is an image.RGBA
> newImg := image.NewRGBA(src.Bounds())
>
> draw.Draw(newImg, newImg.Bou
Sorry, this site:
https://www.socketloop.com/tutorials/golang-convert-png-transparent-background-image-to-jpg-or-jpeg-image
On Tue, Nov 8, 2016 at 3:24 PM, Jordan Stinson
wrote:
> I realize that there isn't an alpha channel. My understanding is that the
> image/draw package would blend the colou
I realize that there isn't an alpha channel. My understanding is that the
image/draw package would blend the colours according to the alpha value in
the image and the blending equation.
This site seems to suggest that it will work.
On Tue, Nov 8, 2016 at 2:37 PM, Jonathan Wills
wrote:
> jpeg do
Hi,
I'm trying to write out a png with an alpha component as a jpeg. As I
understand it, I should be able to use the draw package to do this.
// src is an image.RGBA
newImg := image.NewRGBA(src.Bounds())
draw.Draw(newImg, newImg.Bounds(), &image.Uniform{color.White},
image.Poin