h2non / imaginary

Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
https://fly.io/docs/app-guides/run-a-global-image-service/
MIT License
5.55k stars 456 forks source link

opacity for background color #375

Open gb6881 opened 2 years ago

gb6881 commented 2 years ago

Hi,

we want to extend an image using "extend", the target image at the end should be supporting transparency/opacity.

i tried with:

[
    {
        "operation": "resize",
        "params": {
            "extend": "background",
            "background": "255,255,255,0",
            "width": 1250,
            "stripmeta": false,
            "type": "webp",
            "nocrop": true,
            "height": 703
        }
    }
]

Source: source Result: white-border.webp.gz

is there a way to make that border transparent?

Thanks, Georg