load_surface_from_pixbuf: Apply alpha correctly
load_surface_from_pixbuf: Apply alpha correctly

The code here was casting the variable alpha to u8 and then multiplying
the color component by this. This means that the multiplication was with
either 0 or 1.

Fix this by casting the color component to f64 for the multiplication
and casting back afterwards.

This makes the following code work (both images now finally look the
same):

    local cairo = require("lgi").cairo
    local surface = cairo.ImageSurface(cairo.Format.ARGB32, 100, 100)
    local cr = cairo.Context(surface)
    cr:set_source(require("gears.color")({
            type = "linear",
            from = { 0, 0 },
            to = { 100, 0 },
            stops = {
                    { 0, "#fff0" },
                    { 1, "#ffff" },
            }
    }))
    cr:set_operator("SOURCE")
    cr:paint()
    surface:write_to_png("/tmp/transparency_test.png")

    local surface2 = require("gears.surface")("/tmp/transparency_test.png");
    surface2:write_to_png("/tmp/transparency_test2.png")

Signed-off-by: Uli Schlachter <346c0ad49ac8427b61b3b55abbe37dc0ebd524f2@znc.in>

Immington-Industries/way-cooler,way-cooler/way-cooler,way-cooler/way-cooler,Immington-Industries/way-cooler,Immington-Industries/way-cooler,way-cooler/way-cooler