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

Feature request: Gradient improvements #1277

Closed
marcoreni opened this issue Apr 30, 2024 · 5 comments
Closed

Feature request: Gradient improvements #1277

marcoreni opened this issue Apr 30, 2024 · 5 comments

Comments

@marcoreni
Copy link

Hi all,

we're experimenting with the gradient feature and we'd like to have the ability to create oblique gradients, similar to the following image

oblique

For these we think we may need:

  • a gravity point
  • to be able to set "degrees" as directions

The image attached may be created as:

  • gravity: south west
  • degrees: 30
@DarthSim
Copy link
Member

DarthSim commented May 2, 2024

Hi @marcoreni!

I'm not sure how gravity can be used to build a gradient. I believe, the ability to use degrees as direction should be pretty enough to build the gradient from your example.

@marcoreni
Copy link
Author

Hi @DarthSim ,

when using the gradient we currently have the direction of the gradient. If we use angles, we may need to set where the gradient is attached to.

In the following image I've drawn different scenarios based on the same "angle" - the red line represents the "gradient end". Do you think that start & stop params will be enough?

image

@DarthSim
Copy link
Member

DarthSim commented May 2, 2024

Do you think that start & stop params will be enough?

Exactly

@marcoreni
Copy link
Author

Even better, one less parameter to handle! :)

@DarthSim
Copy link
Member

DarthSim commented May 3, 2024

The latest build allows using degrees (clockwise) as the gradient direction: https://docs.imgproxy.net/latest/usage/processing#gradient

Here's a reproduction of your example with gr:0.8:f00:31:0.62:0.88:

gradient

@DarthSim DarthSim closed this as completed May 7, 2024
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

2 participants