Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add background alpha or alpha operations? #64

Open
denis23kw opened this issue Dec 26, 2023 · 0 comments
Open

Add background alpha or alpha operations? #64

denis23kw opened this issue Dec 26, 2023 · 0 comments

Comments

@denis23kw
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant