invertase / firebase-extensions

A collection of Firebase Extensions built by Invertase.
https://extensions.invertase.dev
Apache License 2.0
28 stars 12 forks source link

Add background alpha or alpha operations? #64

Open denis23kw opened 10 months ago

denis23kw commented 10 months ago

Hi there!

Here is my little problem, for example I have a picture 256x256, I want to extend it to 512x512, so I'm using next operation

{
  operation: 'extend',
  left: 128,
  right: 128,
  top: 128,
  bottom: 128
}

It works well! For background, I can use background: #000 to make it any color, but I want to make it transparent, I have tried to use background: rgba(0, 0, 0, 0) or background: 'transparent' and it also works well .. but only with png source images, if I'm using jpg and same background parameters then background become black by default

Can you make it transparent too? No matter what is the source images, if you extend it you can set background: 'transparent' and got a transparent background (of course if your output compatible with alpha channel)


If it is not, so .. I can always do another one operation before extend (convert image to png first) but it takes extra request which I dont want to do in optimization purposes